Systems and methods of using packet boundaries for reduction in timeout prevention

ABSTRACT

Systems and methods for utilizing transaction boundary detection methods in queuing and retransmission decisions relating to network traffic are described. By detecting transaction boundaries and sizes, a client, server, or intermediary device may prioritize based on transaction sizes in queuing decisions, giving precedence to smaller transactions which may represent interactive and/or latency-sensitive traffic. Further, after detecting a transaction boundary, a device may retransmit one or more additional packets prompting acknowledgements, in order to ensure timely notification if the last packet of the transaction has been dropped. Systems and methods for potentially improving network latency, including retransmitting a dropped packet twice or more in order to avoid incurring additional delays due to a retransmitted packet being lost are also described.

RELATED APPLICATIONS

The present application is a continuation-in-part of U.S. patentapplication Ser. No. 10/901,940 filed on Jul. 28, 2004, which is itselfa continuation-in-part of U.S. patent application Ser. No. 10/696,507filed on Oct. 29, 2003, which is a nonprovisional applicationcorresponding to the U.S. Provisional Application 60/490,694 filed onJul. 29, 2003.

FIELD OF THE INVENTION

The present invention generally relates to data communication networks.In particular, the present invention relates to systems and methods fordynamically controlling bandwidth by a proxy of one or more connections.

BACKGROUND OF THE INVENTION

Different types of network traffic have different sensitivity to networkperformance. With regard to latency, large file transfers may berelatively unaffected by moderate increases in the latency of aconnection. By contrast, interactive traffic, such as VoIP, remoteprocedure calls, media streaming, application streaming, and remoteapplication execution, may be dramatically affected by changes inlatency which lead to slower application response times.

Existing quality of service (QoS) systems may attempt to prioritizeinteractive traffic to reduce latency, but may face severaldifficulties. First, bandwidth-allocation methods of QoS may ensure thata certain amount of interactive traffic has the bandwidth to passthrough a network, but the bandwidth allocation may have no guarantee oflatency. Second, interactive traffic may be difficult to identify. Manyports and applications carry a mix of interactive, streaming, and bulktraffic. Thus, simply prioritizing packets based on a port or underlyingapplication may not properly identify latency sensitive traffic. Thereexists a need for methods of identifying and prioritizing networktraffic based on the latency sensitivity of the traffic.

An additional potential cause of latency with respect to interactive orstreaming traffic is dropped packets. Dropped packets can imposeadditional costs on traffic containing, such as interactive or streamingtraffic, which may contain significant gaps between transmitted packets.Where these gaps occur, a receiver may not be able to identify if apacket immediately preceding the gap was lost since there are nosubsequent packets to inform the receiver that the last packet existed.Many protocols, such as TCP, may use a retransmission timeout (RTO) todiscover and correct cases such as this where the last packet of a grouphas been dropped. However, RTOs may provide only coarse control overdelays induced by packet losses. In some protocols, RTOs can be veryexpensive, such as TCP, where the RTO is by default a full second. Thereexists a need for methods of avoiding these retransmission timeouts toimprove connection performance.

Further, in many protocols, including, for example, TCP, useretransmissions as one means for providing a reliable data stream. Inaddition to standard retransmission delays, extra delays may be incurredwhen a retransmitted packet is also dropped. In some cases, the droppingof a retransmitted packet may cause a delay equal to a full round triptime. This delay may have severe effects on time-sensitive networktraffic. Thus, there exists a need for systems and methods formitigating or avoiding the delay caused by dropped retransmissions.

BRIEF SUMMARY OF THE INVENTION

The present invention is directed towards systems and methods forutilizing transaction boundary detection methods in queuing andretransmission decisions relating to network traffic. By detectingtransaction boundaries and sizes, a client, server, or intermediarydevice may prioritize based on transaction sizes in queuing decisions,giving precedence to smaller transactions which may representinteractive and/or latency-sensitive traffic. Further, after detecting atransaction boundary, a device may retransmit one or more additionalpackets prompting acknowledgements, in order to ensure timelynotification if the last packet of the transaction has been dropped. Thepresent invention is also directed to other retransmission systems andmethods for potentially improving network latency, includingretransmitting a dropped packet twice or more in order to avoidincurring additional delays due to a retransmitted packet being lost.

In a first aspect, the present invention relates to methods forprioritizing, based on transaction size, packets awaiting transmissionfrom an intermediary. In one embodiment, a method comprises: receiving,by an intermediary, a first packet and a second packet. The intermediarymay then determine a first transaction size corresponding to the firstpacket or an average transaction size corresponding to a connection fromwhich the first packet was received. The intermediary, may assign afirst transmission priority to the first packet, the transmissionpriority determined responsive to the determined first transaction size.The intermediary may then transmit the first packet and the secondpacket, wherein the transmission order is determined according to thefirst assigned transmission priority.

In a second aspect, the present invention relates to systems forprioritizing, based on transaction size, packets awaiting transmissionfrom an intermediary device. In one embodiment, a system comprises: apacket processor receiving a first packet and a second packet; and aflow controller determining a first transaction size associated with thefirst packet; assigning to the first packet a transmission priorityresponsive to the determined first transaction size; and transmitting,the first packet and the second packet according to the assignedtransmission priority.

In a third aspect, the present invention relates to methods for reducingtransmission timeouts by selectively transmitting additional packetsfrom an intermediary device based on identifying transaction boundaries.In one embodiment, the method comprises: receiving, by a device via atransport layer connection between a sender and a receiver, a firstpacket from the sender via the first transport layer connection;transmitting, by the device, the first packet to the receiver;determining, by the device, that the first packet is smaller than amaximum packet size of the transport layer connection; generating, bythe device in response to the determination, at least one additionalpacket; and transmitting, by the device after the first packet has beentransmitted to the receiver, the at least one additional packet to thereceiver via the transport layer connection.

In a fourth aspect, the present invention relates to systems forreducing transmission timeouts by selectively transmitting additionalpackets from an intermediary device based on identifying transactionboundaries. In one embodiment, a system comprises: a device which servesas an intermediary for a transport layer connection between a sender anda receiver, the device comprising: a packet processor which receives afirst packet from the sender via the first transport layer connection;and transmits the first packet to the receiver; and a flow controllerwhich determines that the first packet is smaller than a maximum packetsize of the transport layer connection, in response to thedetermination, at least one additional packet; and transmits, after thefirst packet has been transmitted to the receiver, the at least oneadditional packet to the receiver via the transport layer connection.

In a fifth aspect, the present invention relates to methods forretransmitting network packets between a sender and a receiver to reducetransmission errors associated with a transport layer connection. In oneembodiment, a method comprises: receiving, by a device, an indicationthat a network packet transmitted via a transport layer connection wasnot received by the receiver; retransmitting, by the device, the networkpacket to the receiver in response to the indication; determining, bythe device, a packet loss rate associated with the transport layerconnection; determining, by the device in response to the determinedpacket loss rate, a number of additional retransmissions; andretransmitting, by the device, the network packet in accordance with thedetermined number of additional retransmissions.

In a sixth aspect, the present invention relates to systems forretransmitting network packets between a sender and a receiver to reducetransmission errors associated with a transport layer connection. In oneembodiment, a system comprises: a packet processor which receives anindication that a network packet transmitted via a transport layerconnection was not received by the receiver; and retransmits the networkpacket to the receiver in response to the indication; and a flowcontroller in communication with the packet processor which determines apacket loss rate associated with the transport layer connection;determines, in response to the determined packet loss rate, a number ofadditional retransmissions; and retransmits the network packet inaccordance with the determined number of additional retransmissions.

The details of various embodiments of the invention are set forth in theaccompanying drawings and the description below.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects, aspects, features, and advantages ofthe invention will become more apparent and better understood byreferring to the following description taken in conjunction with theaccompanying drawings, in which:

FIG. 1A is a block diagram of an embodiment of a network environment fora client to access a server via one or more network optimizationappliances;

FIG. 1B is a block diagram of another embodiment of a networkenvironment for a client to access a server via one or more networkoptimization appliances in conjunction with other network appliances;

FIG. 1C is a block diagram of another embodiment of a networkenvironment for a client to access a server via a single networkoptimization appliance deployed stand-alone or in conjunction with othernetwork appliances;

FIGS. 1D and 1E are block diagrams of embodiments of a computing device;

FIG. 2A is a block diagram of an embodiment of an appliance forprocessing communications between a client and a server;

FIG. 2B is a block diagram of another embodiment of a client and/orserver deploying the network optimization features of the appliance;

FIG. 3 is a block diagram of an embodiment of a client for communicatingwith a server using the network optimization feature;

FIG. 4 is a block diagram of a sample TCP packet;

FIG. 4 illustrates a sample TCP packet;

FIG. 5 is an illustration of a number of clients transmitting packetgroups which may classified as transactions

FIG. 6 is a flow diagram of a method for prioritizing, based ontransaction size, packets awaiting transmission from an intermediarydevice;

FIGS. 7A and 7B depict systems and methods for using transactionboundaries to reduce timeout penalties; and

FIGS. 8A and 8B depict systems and methods for retransmitting networkpackets between a sender and a receiver to reduce retransmission costsassociated with a transport layer connection

The features and advantages of the present invention will become moreapparent from the detailed description set forth below when taken inconjunction with the drawings, in which like reference charactersidentify corresponding elements throughout. In the drawings, likereference numbers generally indicate identical, functionally similar,and/or structurally similar elements.

DETAILED DESCRIPTION OF THE INVENTION

For purposes of reading the description of the various embodiments ofthe present invention below, the following descriptions of the sectionsof the specification and their respective contents may be helpful:

-   -   Section A describes a network environment and computing        environment useful for practicing an embodiment of the present        invention;    -   Section B describes embodiments of a system and appliance        architecture for accelerating delivery of a computing        environment to a remote user;    -   Section C describes embodiments of a client agent for        accelerating communications between a client and a server;    -   Section D describes embodiments of systems and methods for using        transaction boundaries to determine transmission priorities; and    -   Section E describes embodiments of systems and methods for        reducing timeout penalties and costs associated with network        connections        A. Network and Computing Environment

Prior to discussing the specifics of embodiments of the systems andmethods of an appliance and/or client, it may be helpful to discuss thenetwork and computing environments in which such embodiments may bedeployed. Referring now to FIG. 1A, an embodiment of a networkenvironment is depicted. In brief overview, the network environment hasone or more clients 102 a-102 n (also generally referred to as localmachine(s) 102, or client(s) 102) in communication with one or moreservers 106 a-106 n (also generally referred to as server(s) 106, orremote machine(s) 106) via one or more networks 104, 104′, 104″. In someembodiments, a client 102 communicates with a server 106 via one or morenetwork optimization appliances 200, 200′ (generally referred to asappliance 200). In one embodiment, the network optimization appliance200 is designed, configured or adapted to optimize Wide Area Network(WAN) network traffic. In some embodiments, a first appliance 200 worksin conjunction or cooperation with a second appliance 200′ to optimizenetwork traffic. For example, a first appliance 200 may be locatedbetween a branch office and a WAN connection while the second appliance200′ is located between the WAN and a corporate Local Area Network(LAN). The appliances 200 and 200′ may work together to optimize the WANrelated network traffic between a client in the branch office and aserver on the corporate LAN.

Although FIG. 1A shows a network 104, network 104′ and network 104″(generally referred to as network(s) 104) between the clients 102 andthe servers 106, the clients 102 and the servers 106 may be on the samenetwork 104. The networks 104, 104′, 104″ can be the same type ofnetwork or different types of networks. The network 104 can be alocal-area network (LAN), such as a company Intranet, a metropolitanarea network (MAN), or a wide area network (WAN), such as the Internetor the World Wide Web. The networks 104, 104′, 104″ can be a private orpublic network. In one embodiment, network 104′ or network 104″ may be aprivate network and network 104 may be a public network. In someembodiments, network 104 may be a private network and network 104′and/or network 104″ a public network. In another embodiment, networks104, 104′, 104″ may be private networks. In some embodiments, clients102 may be located at a branch office of a corporate enterprisecommunicating via a WAN connection over the network 104 to the servers106 located on a corporate LAN in a corporate data center.

The network 104 may be any type and/or form of network and may includeany of the following: a point to point network, a broadcast network, awide area network, a local area network, a telecommunications network, adata communication network, a computer network, an ATM (AsynchronousTransfer Mode) network, a SONET (Synchronous Optical Network) network, aSDH (Synchronous Digital Hierarchy) network, a wireless network and awireline network. In some embodiments, the network 104 may comprise awireless link, such as an infrared channel or satellite band. Thetopology of the network 104 may be a bus, star, or ring networktopology. The network 104 and network topology may be of any suchnetwork or network topology as known to those ordinarily skilled in theart capable of supporting the operations described herein.

As depicted in FIG. 1A, a first network optimization appliance 200 isshown between networks 104 and 104′ and a second network optimizationappliance 200′ is also between networks 104′ and 104″. In someembodiments, the appliance 200 may be located on network 104. Forexample, a corporate enterprise may deploy an appliance 200 at thebranch office. In other embodiments, the appliance 200 may be located onnetwork 104′. In some embodiments, the appliance 200′ may be located onnetwork 104′ or network 104″. For example, an appliance 200 may belocated at a corporate data center. In one embodiment, the appliance 200and 200′ are on the same network. In another embodiment, the appliance200 and 200′ are on different networks.

In one embodiment, the appliance 200 is a device for accelerating,optimizing or otherwise improving the performance, operation, or qualityof service of any type and form of network traffic. In some embodiments,the appliance 200 is a performance enhancing proxy. In otherembodiments, the appliance 200 is any type and form of WAN optimizationor acceleration device, sometimes also referred to as a WAN optimizationcontroller. In one embodiment, the appliance 200 is any of the productembodiments referred to as WANScaler manufactured by Citrix Systems,Inc. of Ft. Lauderdale, Fla. In other embodiments, the appliance 200includes any of the product embodiments referred to as BIG-IP linkcontroller and WANjet manufactured by F5 Networks, Inc. of Seattle,Wash. In another embodiment, the appliance 200 includes any of the WXand WXC WAN acceleration device platforms manufactured by JuniperNetworks, Inc. of Sunnyvale, Calif. In some embodiments, the appliance200 includes any of the steelhead line of WAN optimization appliancesmanufactured by Riverbed Technology of San Francisco, Calif. In otherembodiments, the appliance 200 includes any of the WAN related devicesmanufactured by Expand Networks Inc. of Roseland, N.J. In oneembodiment, the appliance 200 includes any of the WAN related appliancesmanufactured by Packeteer Inc. of Cupertino, Calif., such as thePacketShaper, iShared, and SkyX product embodiments provided byPacketeer. In yet another embodiment, the appliance 200 includes any WANrelated appliances and/or software manufactured by Cisco Systems, Inc.of San Jose, Calif., such as the Cisco Wide Area Network ApplicationServices software and network modules, and Wide Area Network engineappliances.

In some embodiments, the appliance 200 provides application and dataacceleration services for branch-office or remote offices. In oneembodiment, the appliance 200 includes optimization of Wide Area FileServices (WAFS). In another embodiment, the appliance 200 acceleratesthe delivery of files, such as via the Common Internet File System(CIFS) protocol. In other embodiments, the appliance 200 providescaching in memory and/or storage to accelerate delivery of applicationsand data. In one embodiment, the appliance 205 provides compression ofnetwork traffic at any level of the network stack or at any protocol ornetwork layer. In another embodiment, the appliance 200 providestransport layer protocol optimizations, flow control, performanceenhancements or modifications and/or management to accelerate deliveryof applications and data over a WAN connection. For example, in oneembodiment, the appliance 200 provides Transport Control Protocol (TCP)optimizations. In other embodiments, the appliance 200 providesoptimizations, flow control, performance enhancements or modificationsand/or management for any session or application layer protocol. Furtherdetails of the optimization techniques, operations and architecture ofthe appliance 200 are discussed below in Section B.

Still referring to FIG. 1A, the network environment may includemultiple, logically-grouped servers 106. In these embodiments, thelogical group of servers may be referred to as a server farm 38. In someof these embodiments, the servers 106 may be geographically dispersed.In some cases, a farm 38 may be administered as a single entity. Inother embodiments, the server farm 38 comprises a plurality of serverfarms 38. In one embodiment, the server farm executes one or moreapplications on behalf of one or more clients 102.

The servers 106 within each farm 38 can be heterogeneous. One or more ofthe servers 106 can operate according to one type of operating systemplatform (e.g., WINDOWS NT, manufactured by Microsoft Corp. of Redmond,Wash.), while one or more of the other servers 106 can operate onaccording to another type of operating system platform (e.g., Unix orLinux). The servers 106 of each farm 38 do not need to be physicallyproximate to another server 106 in the same farm 38. Thus, the group ofservers 106 logically grouped as a farm 38 may be interconnected using awide-area network (WAN) connection or metropolitan-area network (MAN)connection. For example, a farm 38 may include servers 106 physicallylocated in different continents or different regions of a continent,country, state, city, campus, or room. Data transmission speeds betweenservers 106 in the farm 38 can be increased if the servers 106 areconnected using a local-area network (LAN) connection or some form ofdirect connection.

Servers 106 may be file servers, application servers, web servers, proxyservers, and/or gateway servers. In some embodiments, a server 106 mayhave the capacity to function as either an application server or as amaster application server. In one embodiment, a server 106 may includean Active Directory. The clients 102 may also be referred to as clientnodes or endpoints. In some embodiments, a client 102 has the capacityto function as both a client node seeking access to applications on aserver and as an application server providing access to hostedapplications for other clients 102 a-102 n.

In some embodiments, a client 102 communicates with a server 106. In oneembodiment, the client 102 communicates directly with one of the servers106 in a farm 38. In another embodiment, the client 102 executes aprogram neighborhood application to communicate with a server 106 in afarm 38. In still another embodiment, the server 106 provides thefunctionality of a master node. In some embodiments, the client 102communicates with the server 106 in the farm 38 through a network 104.Over the network 104, the client 102 can, for example, request executionof various applications hosted by the servers 106 a-106 n in the farm 38and receive output of the results of the application execution fordisplay. In some embodiments, only the master node provides thefunctionality required to identify and provide address informationassociated with a server 106′ hosting a requested application.

In one embodiment, a server 106 provides functionality of a web server.In another embodiment, the server 106 a receives requests from theclient 102, forwards the requests to a second server 106 b and respondsto the request by the client 102 with a response to the request from theserver 106 b. In still another embodiment, the server 106 acquires anenumeration of applications available to the client 102 and addressinformation associated with a server 106 hosting an applicationidentified by the enumeration of applications. In yet anotherembodiment, the server 106 presents the response to the request to theclient 102 using a web interface. In one embodiment, the client 102communicates directly with the server 106 to access the identifiedapplication. In another embodiment, the client 102 receives applicationoutput data, such as display data, generated by an execution of theidentified application on the server 106.

Deployed with Other Appliances.

Referring now to FIG. 1B, another embodiment of a network environment isdepicted in which the network optimization appliance 200 is deployedwith one or more other appliances 205, 205′ (generally referred to asappliance 205 or second appliance 205) such as a gateway, firewall oracceleration appliance. For example, in one embodiment, the appliance205 is a firewall or security appliance while appliance 205′ is a LANacceleration device. In some embodiments, a client 102 may communicateto a server 106 via one or more of the first appliances 200 and one ormore second appliances 205.

One or more appliances 200 and 205 may be located at any point in thenetwork or network communications path between a client 102 and a server106. In some embodiments, a second appliance 205 may be located on thesame network 104 as the first appliance 200. In other embodiments, thesecond appliance 205 may be located on a different network 104 as thefirst appliance 200. In yet another embodiment, a first appliance 200and second appliance 205 is on the same network, for example network104, while the first appliance 200′ and second appliance 205′ is on thesame network, such as network 104″.

In one embodiment, the second appliance 205 includes any type and formof transport control protocol or transport later terminating device,such as a gateway or firewall device. In one embodiment, the appliance205 terminates the transport control protocol by establishing a firsttransport control protocol connection with the client and a secondtransport control connection with the second appliance or server. Inanother embodiment, the appliance 205 terminates the transport controlprotocol by changing, managing or controlling the behavior of thetransport control protocol connection between the client and the serveror second appliance. For example, the appliance 205 may change, queue,forward or transmit network packets in manner to effectively terminatethe transport control protocol connection or to act or simulate asterminating the connection.

In some embodiments, the second appliance 205 is a performance enhancingproxy. In one embodiment, the appliance 205 provides a virtual privatenetwork (VPN) connection. In some embodiments, the appliance 205provides a Secure Socket Layer VPN (SSL VPN) connection. In otherembodiments, the appliance 205 provides an IPsec (Internet ProtocolSecurity) based VPN connection. In some embodiments, the appliance 205provides any one or more of the following functionality: compression,acceleration, load-balancing, switching/routing, caching, and TransportControl Protocol (TCP) acceleration.

In one embodiment, the appliance 205 is any of the product embodimentsreferred to as Access Gateway, Application Firewall, ApplicationGateway, or NetScaler manufactured by Citrix Systems, Inc. of Ft.Lauderdale, Fla. As such, in some embodiments, the appliance 205includes any logic, functions, rules, or operations to perform servicesor functionality such as SSL VPN connectivity, SSL offloading,switching/load balancing, Domain Name Service resolution, LANacceleration and an application firewall.

In some embodiments, the appliance 205 provides a SSL VPN connectionbetween a client 102 and a server 106. For example, a client 102 on afirst network 104 requests to establish a connection to a server 106 ona second network 104′. In some embodiments, the second network 104″ isnot routable from the first network 104. In other embodiments, theclient 102 is on a public network 104 and the server 106 is on a privatenetwork 104′, such as a corporate network. In one embodiment, a clientagent intercepts communications of the client 102 on the first network104, encrypts the communications, and transmits the communications via afirst transport layer connection to the appliance 205. The appliance 205associates the first transport layer connection on the first network 104to a second transport layer connection to the server 106 on the secondnetwork 104. The appliance 205 receives the intercepted communicationfrom the client agent, decrypts the communications, and transmits thecommunication to the server 106 on the second network 104 via the secondtransport layer connection. The second transport layer connection may bea pooled transport layer connection. In one embodiment, the appliance205 provides an end-to-end secure transport layer connection for theclient 102 between the two networks 104, 104′

In one embodiment, the appliance 205 hosts an intranet internet protocolor intranetIP address of the client 102 on the virtual private network104. The client 102 has a local network identifier, such as an internetprotocol (IP) address and/or host name on the first network 104. Whenconnected to the second network 104′ via the appliance 205, theappliance 205 establishes, assigns or otherwise provides an IntranetIP,which is a network identifier, such as IP address and/or host name, forthe client 102 on the second network 104′. The appliance 205 listens forand receives on the second or private network 104′ for anycommunications directed towards the client 102 using the client'sestablished IntranetIP. In one embodiment, the appliance 205 acts as oron behalf of the client 102 on the second private network 104.

In some embodiment, the appliance 205 has an encryption engine providinglogic, business rules, functions or operations for handling theprocessing of any security related protocol, such as SSL or TLS, or anyfunction related thereto. For example, the encryption engine encryptsand decrypts network packets, or any portion thereof, communicated viathe appliance 205. The encryption engine may also setup or establish SSLor TLS connections on behalf of the client 102 a-102 n, server 106 a-106n, or appliance 200, 205. As such, the encryption engine providesoffloading and acceleration of SSL processing. In one embodiment, theencryption engine uses a tunneling protocol to provide a virtual privatenetwork between a client 102 a-102 n and a server 106 a-106 n. In someembodiments, the encryption engine uses an encryption processor. Inother embodiments, the encryption engine includes executableinstructions running on an encryption processor.

In some embodiments, the appliance 205 provides one or more of thefollowing acceleration techniques to communications between the client102 and server 106: 1) compression, 2) decompression, 3) TransmissionControl Protocol pooling, 4) Transmission Control Protocol multiplexing,5) Transmission Control Protocol buffering, and 6) caching. In oneembodiment, the appliance 200 relieves servers 106 of much of theprocessing load caused by repeatedly opening and closing transportlayers connections to clients 102 by opening one or more transport layerconnections with each server 106 and maintaining these connections toallow repeated data accesses by clients via the Internet. This techniqueis referred to herein as “connection pooling”.

In some embodiments, in order to seamlessly splice communications from aclient 102 to a server 106 via a pooled transport layer connection, theappliance 205 translates or multiplexes communications by modifyingsequence number and acknowledgment numbers at the transport layerprotocol level. This is referred to as “connection multiplexing”. Insome embodiments, no application layer protocol interaction is required.For example, in the case of an in-bound packet (that is, a packetreceived from a client 102), the source network address of the packet ischanged to that of an output port of appliance 205, and the destinationnetwork address is changed to that of the intended server. In the caseof an outbound packet (that is, one received from a server 106), thesource network address is changed from that of the server 106 to that ofan output port of appliance 205 and the destination address is changedfrom that of appliance 205 to that of the requesting client 102. Thesequence numbers and acknowledgment numbers of the packet are alsotranslated to sequence numbers and acknowledgement expected by theclient 102 on the appliance's 205 transport layer connection to theclient 102. In some embodiments, the packet checksum of the transportlayer protocol is recalculated to account for these translations.

In another embodiment, the appliance 205 provides switching orload-balancing functionality for communications between the client 102and server 106. In some embodiments, the appliance 205 distributestraffic and directs client requests to a server 106 based on layer 4payload or application-layer request data. In one embodiment, althoughthe network layer or layer 2 of the network packet identifies adestination server 106, the appliance 205 determines the server 106 todistribute the network packet by application information and datacarried as payload of the transport layer packet. In one embodiment, ahealth monitoring program of the appliance 205 monitors the health ofservers to determine the server 106 for which to distribute a client'srequest. In some embodiments, if the appliance 205 detects a server 106is not available or has a load over a predetermined threshold, theappliance 205 can direct or distribute client requests to another server106.

In some embodiments, the appliance 205 acts as a Domain Name Service(DNS) resolver or otherwise provides resolution of a DNS request fromclients 102. In some embodiments, the appliance intercepts' a DNSrequest transmitted by the client 102. In one embodiment, the appliance205 responds to a client's DNS request with an IP address of or hostedby the appliance 205. In this embodiment, the client 102 transmitsnetwork communication for the domain name to the appliance 200. Inanother embodiment, the appliance 200 responds to a client's DNS requestwith an IP address of or hosted by a second appliance 200′. In someembodiments, the appliance 205 responds to a client's DNS request withan IP address of a server 106 determined by the appliance 200.

In yet another embodiment, the appliance 205 provides applicationfirewall functionality for communications between the client 102 andserver 106. In one embodiment, a policy engine 295′ provides rules fordetecting and blocking illegitimate requests. In some embodiments, theapplication firewall protects against denial of service (DoS) attacks.In other embodiments, the appliance inspects the content of interceptedrequests to identify and block application-based attacks. In someembodiments, the rules/policy engine includes one or more applicationfirewall or security control policies for providing protections againstvarious classes and types of web or Internet based vulnerabilities, suchas one or more of the following: 1) buffer overflow, 2) CGI-BINparameter manipulation, 3) form/hidden field manipulation, 4) forcefulbrowsing, 5) cookie or session poisoning, 6) broken access control list(ACLs) or weak passwords, 7) cross-site scripting (XSS), 8) commandinjection, 9) SQL injection, 10) error triggering sensitive informationleak, 11) insecure use of cryptography, 12) server misconfiguration, 13)back doors and debug options, 14) website defacement, 15) platform oroperating systems vulnerabilities, and 16) zero-day exploits. In anembodiment, the application firewall of the appliance provides HTML formfield protection in the form of inspecting or analyzing the networkcommunication for one or more of the following: 1) required fields arereturned, 2) no added field allowed, 3) read-only and hidden fieldenforcement, 4) drop-down list and radio button field conformance, and5) form-field max-length enforcement. In some embodiments, theapplication firewall of the appliance 205 ensures cookies are notmodified. In other embodiments, the appliance 205 protects againstforceful browsing by enforcing legal URLs.

In still yet other embodiments, the application firewall appliance 205protects any confidential information contained in the networkcommunication. The appliance 205 may inspect or analyze any networkcommunication in accordance with the rules or polices of the policyengine to identify any confidential information in any field of thenetwork packet. In some embodiments, the application firewall identifiesin the network communication one or more occurrences of a credit cardnumber, password, social security number, name, patient code, contactinformation, and age. The encoded portion of the network communicationmay include these occurrences or the confidential information. Based onthese occurrences, in one embodiment, the application firewall may takea policy action on the network communication, such as preventtransmission of the network communication. In another embodiment, theapplication firewall may rewrite, remove or otherwise mask suchidentified occurrence or confidential information.

Although generally referred to as a network optimization or firstappliance 200 and a second appliance 205, the first appliance 200 andsecond appliance 205 may be the same type and form of appliance. In oneembodiment, the second appliance 205 may perform the same functionality,or portion thereof, as the first appliance 200, and vice-versa. Forexample, the first appliance 200 and second appliance 205 may bothprovide acceleration techniques. In one embodiment, the first appliancemay perform LAN acceleration while the second appliance performs WANacceleration, or vice-versa. In another example, the first appliance 200may also be a transport control protocol terminating device as with thesecond appliance 205. Furthermore, although appliances 200 and 205 areshown as separate devices on the network, the appliance 200 and/or 205could be a part of any client 102 or server 106.

Referring now to FIG. 1C, other embodiments of a network environment fordeploying the appliance 200 are depicted. In another embodiment asdepicted on the top of FIG. 1C, the appliance 200 may be deployed as asingle appliance or single proxy on the network 104. For example, theappliance 200 may be designed, constructed or adapted to perform WANoptimization techniques discussed herein without a second cooperatingappliance 200′. In other embodiments as depicted on the bottom of FIG.1C, a single appliance 200 may be deployed with one or more secondappliances 205. For example, a WAN acceleration first appliance 200,such as a Citrix WANScaler appliance, may be deployed with a LANaccelerating or Application Firewall second appliance 205, such as aCitrix NetScaler appliance.

Computing Device

The client 102, server 106, and appliance 200 and 205 may be deployed asand/or executed on any type and form of computing device, such as acomputer, network device or appliance capable of communicating on anytype and form of network and performing the operations described herein.FIGS. 1C and 1D depict block diagrams of a computing device 100 usefulfor practicing an embodiment of the client 102, server 106 or appliance200. As shown in FIGS. 1C and 1D, each computing device 100 includes acentral processing unit 101, and a main memory unit 122. As shown inFIG. 1C, a computing device 100 may include a visual display device 124,a keyboard 126 and/or a pointing device 127, such as a mouse. Eachcomputing device 100 may also include additional optional elements, suchas one or more input/output devices 130 a-130 b (generally referred tousing reference numeral 130), and a cache memory 140 in communicationwith the central processing unit 101.

The central processing unit 101 is any logic circuitry that responds toand processes instructions fetched from the main memory unit 122. Inmany embodiments, the central processing unit is provided by amicroprocessor unit, such as: those manufactured by Intel Corporation ofMountain View, Calif.; those manufactured by Motorola Corporation ofSchaumburg, Ill.; those manufactured by Transmeta Corporation of SantaClara, Calif.; the RS/6000 processor, those manufactured byInternational Business Machines of White Plains, N.Y.; or thosemanufactured by Advanced Micro Devices of Sunnyvale, Calif. Thecomputing device 100 may be based on any of these processors, or anyother processor capable of operating as described herein.

Main memory unit 122 may be one or more memory chips capable of storingdata and allowing any storage location to be directly accessed by themicroprocessor 101, such as Static random access memory (SRAM), BurstSRAM or SynchBurst SRAM (BSRAM), Dynamic random access memory (DRAM),Fast Page Mode DRAM (FPM DRAM), Enhanced DRAM (EDRAM), Extended DataOutput RAM (EDO RAM), Extended Data Output DRAM (EDO DRAM), BurstExtended Data Output DRAM (BEDO DRAM), Enhanced DRAM (EDRAM),synchronous DRAM (SDRAM), JEDEC SRAM, PC100 SDRAM, Double Data RateSDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SyncLink DRAM (SLDRAM),Direct Rambus DRAM (DRDRAM), or Ferroelectric RAM (FRAM). The mainmemory 122 may be based on any of the above described memory chips, orany other available memory chips capable of operating as describedherein. In the embodiment shown in FIG. 1C, the processor 101communicates with main memory 122 via a system bus 150 (described inmore detail below). FIG. 1C depicts an embodiment of a computing device100 in which the processor communicates directly with main memory 122via a memory port 103. For example, in FIG. 1D the main memory 122 maybe DRDRAM.

FIG. 1D depicts an embodiment in which the main processor 101communicates directly with cache memory 140 via a secondary bus,sometimes referred to as a backside bus. In other embodiments, the mainprocessor 101 communicates with cache memory 140 using the system bus150. Cache memory 140 typically has a faster response time than mainmemory 122 and is typically provided by SRAM, BSRAM, or EDRAM. In theembodiment shown in FIG. 1C, the processor 101 communicates with variousI/O devices 130 via a local system bus 150. Various busses may be usedto connect the central processing unit 101 to any of the I/O devices130, including a VESA VL bus, an ISA bus, an EISA bus, a MicroChannelArchitecture (MCA) bus, a PCI bus, a PCI-X bus, a PCI-Express bus, or aNuBus. For embodiments in which the I/O device is a video display 124,the processor 101 may use an Advanced Graphics Port (AGP) to communicatewith the display 124. FIG. 1D depicts an embodiment of a computer 100 inwhich the main processor 101 communicates directly with I/O device 130via HyperTransport, Rapid I/O, or InfiniBand. FIG. 1D also depicts anembodiment in which local busses and direct communication are mixed: theprocessor 101 communicates with I/O device 130 using a localinterconnect bus while communicating with I/O device 130 directly.

The computing device 100 may support any suitable installation device116, such as a floppy disk drive for receiving floppy disks such as3.5-inch, 5.25-inch disks or ZIP disks, a CD-ROM drive, a CD-R/RW drive,a DVD-ROM drive, tape drives of various formats, USB device, hard-driveor any other device suitable for installing software and programs suchas any client agent 120, or portion thereof. The computing device 100may further comprise a storage device 128, such as one or more hard diskdrives or redundant arrays of independent disks, for storing anoperating system and other related software, and for storing applicationsoftware programs such as any program related to the client agent 120.Optionally, any of the installation devices 116 could also be used asthe storage device 128. Additionally, the operating system and thesoftware can be run from a bootable medium, for example, a bootable CD,such as KNOPPIX®, a bootable CD for GNU/Linux that is available as aGNU/Linux distribution from knoppix.net.

Furthermore, the computing device 100 may include a network interface118 to interface to a Local Area Network (LAN), Wide Area Network (WAN)or the Internet through a variety of connections including, but notlimited to, standard telephone lines, LAN or WAN links (e.g., 802.11,T1, T3, 56 kb, X.25), broadband connections (e.g., ISDN, Frame Relay,ATM), wireless connections, or some combination of any or all of theabove. The network interface 118 may comprise a built-in networkadapter, network interface card, PCMCIA network card, card bus networkadapter, wireless network adapter, USB network adapter, modem or anyother device suitable for interfacing the computing device 100 to anytype of network capable of communication and performing the operationsdescribed herein. A wide variety of I/O devices 130 a-130 n may bepresent in the computing device 100. Input devices include keyboards,mice, trackpads, trackballs, microphones, and drawing tablets. Outputdevices include video displays, speakers, inkjet printers, laserprinters, and dye-sublimation printers. The I/O devices 130 may becontrolled by an I/O controller 123 as shown in FIG. 1C. The I/Ocontroller may control one or more I/O devices such as a keyboard 126and a pointing device 127, e.g., a mouse or optical pen. Furthermore, anI/O device may also provide storage 128 and/or an installation medium116 for the computing device 100. In still other embodiments, thecomputing device 100 may provide USB connections to receive handheld USBstorage devices such as the USB Flash Drive line of devices manufacturedby Twintech Industry, Inc. of Los Alamitos, Calif.

In some embodiments, the computing device 100 may comprise or beconnected to multiple display devices 124 a-124 n, which each may be ofthe same or different type and/or form. As such, any of the I/O devices130 a-130 n and/or the I/O controller 123 may comprise any type and/orform of suitable hardware, software, or combination of hardware andsoftware to support, enable or provide for the connection and use ofmultiple display devices 124 a-124 n by the computing device 100. Forexample, the computing device 100 may include any type and/or form ofvideo adapter, video card, driver, and/or library to interface,communicate, connect or otherwise use the display devices 124 a-124 n.In one embodiment, a video adapter may comprise multiple connectors tointerface to multiple display devices 124 a-124 n. In other embodiments,the computing device 100 may include multiple video adapters, with eachvideo adapter connected to one or more of the display devices 124 a-124n. In some embodiments, any portion of the operating system of thecomputing device 100 may be configured for using multiple displays 124a-124 n. In other embodiments, one or more of the display devices 124a-124 n may be provided by one or more other computing devices, such ascomputing devices 100 a and 100 b connected to the computing device 100,for example, via a network. These embodiments may include any type ofsoftware designed and constructed to use another computer's displaydevice as a second display device 124 a for the computing device 100.One ordinarily skilled in the art will recognize and appreciate thevarious ways and embodiments that a computing device 100 may beconfigured to have multiple display devices 124 a-124 n.

In further embodiments, an I/O device 130 may be a bridge 170 betweenthe system bus 150 and an external communication bus, such as a USB bus,an Apple Desktop Bus, an RS-232 serial connection, a SCSI bus, aFireWire bus, a FireWire 800 bus, an Ethernet bus, an AppleTalk bus, aGigabit Ethernet bus, an Asynchronous Transfer Mode bus, a HIPPI bus, aSuper HIPPI bus, a SerialPlus bus, a SCI/LAMP bus, a FibreChannel bus,or a Serial Attached small computer system interface bus.

A computing device 100 of the sort depicted in FIGS. 1C and 1D typicallyoperate under the control of operating systems, which control schedulingof tasks and access to system resources. The computing device 100 can berunning any operating system such as any of the versions of theMicrosoft® Windows operating systems, the different releases of the Unixand Linux operating systems, any version of the Mac OS® or OS X forMacintosh computers, any embedded operating system, any real-timeoperating system, any open source operating system, any proprietaryoperating system, any operating systems for mobile computing devices, orany other operating system capable of running on the computing deviceand performing the operations described herein. Typical operatingsystems include: WINDOWS 3.x, WINDOWS 95, WINDOWS 98, WINDOWS 2000,WINDOWS NT 3.51, WINDOWS NT 4.0, WINDOWS CE, WINDOWS 2003, WINDOWS XP,and WINDOWS VISTA all of which are manufactured by Microsoft Corporationof Redmond, Wash.; MacOS and OS X, manufactured by Apple Computer ofCupertino, Calif.; OS/2, manufactured by International Business Machinesof Armonk, N.Y.; and Linux, a freely-available operating systemdistributed by Caldera Corp. of Salt Lake City, Utah, or any type and/orform of a Unix operating system, (such as those versions of Unixreferred to as Solaris/Sparc, Solaris/x86, AIX IBM, HP UX, and SGI(Silicon Graphics)), among others.

In other embodiments, the computing device 100 may have differentprocessors, operating systems, and input devices consistent with thedevice. For example, in one embodiment the computer 100 is a Treo 180,270, 1060, 600 or 650 smart phone manufactured by Palm, Inc. In thisembodiment, the Treo smart phone is operated under the control of thePalmOS operating system and includes a stylus input device as well as afive-way navigator device. In another example, the computing device 100may be a WinCE or PocketPC device with an ARM (Advanced RISC Machine)type of processor. In one example, the computing device 100 includes aSeries 80 (Nokia 9500 or Nokia 9300) type of smart phone manufactured byNokia of Finland, which may run the Symbian OS or EPOC mobile operatingsystem manufactured by Symbian Software Limited of London, UnitedKingdom. In another example, the computing device 100 may include a FOMAM100 brand smart phone manufactured by Motorola, Inc. of Schaumburg,Ill., and operating the EPOC or Symbian OS operating system. In yetanother example, the computing device 100 includes a Sony Ericsson P800,P900 or P910 Alpha model phone manufactured by Sony Ericsson MobileCommunications (USA) Inc. of Research Triangle Park, N.C. Moreover, thecomputing device 100 can be any workstation, desktop computer, laptop ornotebook computer, server, handheld computer, mobile telephone, smartphone, any other computer, or other form of computing ortelecommunications device that is capable of communication and that hassufficient processor power and memory capacity to perform the operationsdescribed herein.

B. System and Appliance Architecture

Referring now to FIG. 2A, an embodiment of a system environment andarchitecture of an appliance 200 for delivering and/or operating acomputing environment on a client is depicted. In some embodiments, aserver 106 includes an application delivery system 290 for delivering acomputing environment or an application and/or data file to one or moreclients 102. In brief overview, a client 102 is in communication with aserver 106 via network 104 and appliance 200. For example, the client102 may reside in a remote office of a company, e.g., a branch office,and the server 106 may reside at a corporate data center. The client 102has a client agent 120, and a computing environment 215. The computingenvironment 215 may execute or operate an application that accesses,processes or uses a data file. The computing environment 215,application and/or data file may be delivered via the appliance 200and/or the server 106.

In some embodiments, the appliance 200 accelerates delivery of acomputing environment 215, or any portion thereof, to a client 102. Inone embodiment, the appliance 200 accelerates the delivery of thecomputing environment 215 by the application delivery system 290. Forexample, the embodiments described herein may be used to acceleratedelivery of a streaming application and data file processable by theapplication from a central corporate data center to a remote userlocation, such as a branch office of the company. In another embodiment,the appliance 200 accelerates transport layer traffic between a client102 and a server 106. In another embodiment, the appliance 200 controls,manages, or adjusts the transport layer protocol to accelerate deliveryof the computing environment. In some embodiments, the appliance 200uses caching and/or compression techniques to accelerate delivery of acomputing environment.

In some embodiments, the application delivery management system 290provides application delivery techniques to deliver a computingenvironment to a desktop of a user, remote or otherwise, based on aplurality of execution methods and based on any authentication andauthorization policies applied via a policy engine 295. With thesetechniques, a remote user may obtain a computing environment and accessto server stored applications and data files from any network connecteddevice 100. In one embodiment, the application delivery system 290 mayreside or execute on a server 106. In another embodiment, theapplication delivery system 290 may reside or execute on a plurality ofservers 106 a-106 n. In some embodiments, the application deliverysystem 290 may execute in a server farm 38. In one embodiment, theserver 106 executing the application delivery system 290 may also storeor provide the application and data file. In another embodiment, a firstset of one or more servers 106 may execute the application deliverysystem 290, and a different server 106 n may store or provide theapplication and data file. In some embodiments, each of the applicationdelivery system 290, the application, and data file may reside or belocated on different servers. In yet another embodiment, any portion ofthe application delivery system 290 may reside, execute or be stored onor distributed to the appliance 200, or a plurality of appliances.

The client 102 may include a computing environment 215 for executing anapplication that uses or processes a data file. The client 102 vianetworks 104, 104′ and appliance 200 may request an application and datafile from the server 106. In one embodiment, the appliance 200 mayforward a request from the client 102 to the server 106. For example,the client 102 may not have the application and data file stored oraccessible locally. In response to the request, the application deliverysystem 290 and/or server 106 may deliver the application and data fileto the client 102. For example, in one embodiment, the server 106 maytransmit the application as an application stream to operate incomputing environment 215 on client 102.

In some embodiments, the application delivery system 290 comprises anyportion of the Citrix Access Suite™ by Citrix Systems, Inc., such as theMetaFrame or Citrix Presentation Server™ and/or any of the Microsoft®Windows Terminal Services manufactured by the Microsoft Corporation. Inone embodiment, the application delivery system 290 may deliver one ormore applications to clients 102 or users via a remote-display protocolor otherwise via remote-based or server-based computing. In anotherembodiment, the application delivery system 290 may deliver one or moreapplications to clients or users via steaming of the application.

In one embodiment, the application delivery system 290 includes a policyengine 295 for controlling and managing the access to applications,selection of application execution methods and the delivery ofapplications. In some embodiments, the policy engine 295 determines theone or more applications a user or client 102 may access. In anotherembodiment, the policy engine 295 determines how the application shouldbe delivered to the user or client 102, e.g., the method of execution.In some embodiments, the application delivery system 290 provides aplurality of delivery techniques from which to select a method ofapplication execution, such as a server-based computing, streaming ordelivering the application locally to the client 120 for localexecution.

In one embodiment, a client 102 requests execution of an applicationprogram and the application delivery system 290 comprising a server 106selects a method of executing the application program. In someembodiments, the server 106 receives credentials from the client 102. Inanother embodiment, the server 106 receives a request for an enumerationof available applications from the client 102. In one embodiment, inresponse to the request or receipt of credentials, the applicationdelivery system 290 enumerates a plurality of application programsavailable to the client 102. The application delivery system 290receives a request to execute an enumerated application. The applicationdelivery system 290 selects one of a predetermined number of methods forexecuting the enumerated application, for example, responsive to apolicy of a policy engine. The application delivery system 290 mayselect a method of execution of the application enabling the client 102to receive application-output data generated by execution of theapplication program on a server 106. The application delivery system 290may select a method of execution of the application enabling the clientor local machine 102 to execute the application program locally afterretrieving a plurality of application files comprising the application.In yet another embodiment, the application delivery system 290 mayselect a method of execution of the application to stream theapplication via the network 104 to the client 102.

A client 102 may execute, operate or otherwise provide an application,which can be any type and/or form of software, program, or executableinstructions such as any type and/or form of web browser, web-basedclient, client-server application, a thin-client computing client, anActiveX control, or a Java applet, or any other type and/or form ofexecutable instructions capable of executing on client 102. In someembodiments, the application may be a server-based or a remote-basedapplication executed on behalf of the client 102 on a server 106. In oneembodiment the server 106 may display output to the client 102 using anythin-client or remote-display protocol, such as the IndependentComputing Architecture (ICA) protocol manufactured by Citrix Systems,Inc. of Ft. Lauderdale, Fla. or the Remote Desktop Protocol (RDP)manufactured by the Microsoft Corporation of Redmond, Wash. Theapplication can use any type of protocol and it can be, for example, anHTTP client, an FTP client, an Oscar client, or a Telnet client. Inother embodiments, the application comprises any type of softwarerelated to VoIP communications, such as a soft IP telephone. In furtherembodiments, the application comprises any application related toreal-time data communications, such as applications for streaming videoand/or audio.

In some embodiments, the server 106 or a server farm 38 may be runningone or more applications, such as an application providing a thin-clientcomputing or remote display presentation application. In one embodiment,the server 106 or server farm 38 executes, as an application, anyportion of the Citrix Access Suite™ by Citrix Systems, Inc., such as theMetaFrame or Citrix Presentation Server™, and/or any of the Microsoft®Windows Terminal Services manufactured by the Microsoft Corporation. Inone embodiment, the application is an ICA client, developed by CitrixSystems, Inc. of Fort Lauderdale, Fla. In other embodiments, theapplication includes a Remote Desktop (RDP) client, developed byMicrosoft Corporation of Redmond, Wash. Also, the server 106 may run anapplication, which for example, may be an application server providingemail services such as Microsoft Exchange manufactured by the MicrosoftCorporation of Redmond, Wash., a web or Internet server, or a desktopsharing server, or a collaboration server. In some embodiments, any ofthe applications may comprise any type of hosted service or products,such as GoToMeeting™ provided by Citrix Online Division, Inc. of SantaBarbara, Calif., WebEx™ provided by WebEx, Inc. of Santa Clara, Calif.,or Microsoft Office Live Meeting provided by Microsoft Corporation ofRedmond, Wash.

Example Appliance Architecture

FIG. 2A also illustrates an example embodiment of the appliance 200. Thearchitecture of the appliance 200 in FIG. 2A is provided by way ofillustration only and is not intended to be limiting in any manner. Theappliance 200 may include any type and form of computing device 100,such as any element or portion described in conjunction with FIGS. 1Dand 1E above. In brief overview, the appliance 200 has one or morenetwork ports 266A-226N and one or more networks stacks 267A-267N forreceiving and/or transmitting communications via networks 104. Theappliance 200 also has a network optimization engine 250 for optimizing,accelerating or otherwise improving the performance, operation, orquality of any network traffic or communications traversing theappliance 200.

The appliance 200 includes or is under the control of an operatingsystem. The operating system of the appliance 200 may be any type and/orform of Unix operating system although the invention is not so limited.As such, the appliance 200 can be running any operating system such asany of the versions of the Microsoft® Windows operating systems, thedifferent releases of the Unix and Linux operating systems, any versionof the Mac OS® for Macintosh computers, any embedded operating system,any network operating system, any real-time operating system, any opensource operating system, any proprietary operating system, any operatingsystems for mobile computing devices or network devices, or any otheroperating system capable of running on the appliance 200 and performingthe operations described herein.

The operating system of appliance 200 allocates, manages, or otherwisesegregates the available system memory into what is referred to askernel or system space, and user or application space. The kernel spaceis typically reserved for running the kernel, including any devicedrivers, kernel extensions or other kernel related software. As known tothose skilled in the art, the kernel is the core of the operatingsystem, and provides access, control, and management of resources andhardware-related elements of the appliance 200. In accordance with anembodiment of the appliance 200, the kernel space also includes a numberof network services or processes working in conjunction with the networkoptimization engine 250, or any portion thereof. Additionally, theembodiment of the kernel will depend on the embodiment of the operatingsystem installed, configured, or otherwise used by the device 200. Incontrast to kernel space, user space is the memory area or portion ofthe operating system used by user mode applications or programsotherwise running in user mode. A user mode application may not accesskernel space directly and uses service calls in order to access kernelservices. The operating system uses the user or application space forexecuting or running applications and provisioning of user levelprograms, services, processes and/or tasks.

The appliance 200 has one or more network ports 266 for transmitting andreceiving data over a network 104. The network port 266 provides aphysical and/or logical interface between the computing device and anetwork 104 or another device 100 for transmitting and receiving networkcommunications. The type and form of network port 266 depends on thetype and form of network and type of medium for connecting to thenetwork. Furthermore, any software of, provisioned for or used by thenetwork port 266 and network stack 267 may run in either kernel space oruser space.

In one embodiment, the appliance 200 has one network stack 267, such asa TCP/IP based stack, for communicating on a network 105, such with theclient 102 and/or the server 106. In one embodiment, the network stack267 is used to communicate with a first network, such as network 104,and also with a second network 104′. In another embodiment, theappliance 200 has two or more network stacks, such as first networkstack 267A and a second network stack 267N. The first network stack 267Amay be used in conjunction with a first port 266A to communicate on afirst network 104. The second network stack 267N may be used inconjunction with a second port 266N to communicate on a second network104′. In one embodiment, the network stack(s) 267 has one or morebuffers for queuing one or more network packets for transmission by theappliance 200.

The network stack 267 includes any type and form of software, orhardware, or any combinations thereof, for providing connectivity to andcommunications with a network. In one embodiment, the network stack 267includes a software implementation for a network protocol suite. Thenetwork stack 267 may have one or more network layers, such as anynetworks layers of the Open Systems Interconnection (OSI) communicationsmodel as those skilled in the art recognize and appreciate. As such, thenetwork stack 267 may have any type and form of protocols for any of thefollowing layers of the OSI model: 1) physical link layer, 2) data linklayer, 3) network layer, 4) transport layer, 5) session layer, 6)presentation layer, and 7) application layer. In one embodiment, thenetwork stack 267 includes a transport control protocol (TCP) over thenetwork layer protocol of the internet protocol (IP), generally referredto as TCP/IP. In some embodiments, the TCP/IP protocol may be carriedover the Ethernet protocol, which may comprise any of the family of IEEEwide-area-network (WAN) or local-area-network (LAN) protocols, such asthose protocols covered by the IEEE 802.3. In some embodiments, thenetwork stack 267 has any type and form of a wireless protocol, such asIEEE 802.11 and/or mobile internet protocol.

In view of a TCP/IP based network, any TCP/IP based protocol may beused, including Messaging Application Programming Interface (MAPI)(email), File Transfer Protocol (FTP), HyperText Transfer Protocol(HTTP), Common Internet File System (CIFS) protocol (file transfer),Independent Computing Architecture (ICA) protocol, Remote DesktopProtocol (RDP), Wireless Application Protocol (WAP), Mobile IP protocol,and Voice Over IP (VoIP) protocol. In another embodiment, the networkstack 267 comprises any type and form of transport control protocol,such as a modified transport control protocol, for example a TransactionTCP (T/TCP), TCP with selection acknowledgements (TCP-SACK), TCP withlarge windows (TCP-LW), a congestion prediction protocol such as theTCP-Vegas protocol, and a TCP spoofing protocol. In other embodiments,any type and form of user datagram protocol (UDP), such as UDP over IP,may be used by the network stack 267, such as for voice communicationsor real-time data communications.

Furthermore, the network stack 267 may include one or more networkdrivers supporting the one or more layers, such as a TCP driver or anetwork layer driver. The network drivers may be included as part of theoperating system of the computing device 100 or as part of any networkinterface cards or other network access components of the computingdevice 100. In some embodiments, any of the network drivers of thenetwork stack 267 may be customized, modified or adapted to provide acustom or modified portion of the network stack 267 in support of any ofthe techniques described herein.

In one embodiment, the appliance 200 provides for or maintains atransport layer connection between a client 102 and server 106 using asingle network stack 267. In some embodiments, the appliance 200effectively terminates the transport layer connection by changing,managing or controlling the behavior of the transport control protocolconnection between the client and the server. In these embodiments, theappliance 200 may use a single network stack 267. In other embodiments,the appliance 200 terminates a first transport layer connection, such asa TCP connection of a client 102, and establishes a second transportlayer connection to a server 106 for use by or on behalf of the client102, e.g., the second transport layer connection is terminated at theappliance 200 and the server 106. The first and second transport layerconnections may be established via a single network stack 267. In otherembodiments, the appliance 200 may use multiple network stacks, forexample 267A and 267N. In these embodiments, the first transport layerconnection may be established or terminated at one network stack 267A,and the second transport layer connection may be established orterminated on the second network stack 267N. For example, one networkstack may be for receiving and transmitting network packets on a firstnetwork, and another network stack for receiving and transmittingnetwork packets on a second network.

As shown in FIG. 2A, the network optimization engine 250 includes one ormore of the following elements, components or modules: network packetprocessing engine 240, LAN/WAN detector 210, flow controller 220, QoSengine 236, protocol accelerator 234, compression engine 238, cachemanager 232 and policy engine 295′. The network optimization engine 250,or any portion thereof, may include software, hardware or anycombination of software and hardware. Furthermore, any software of,provisioned for or used by the network optimization engine 250 may runin either kernel space or user space. For example, in one embodiment,the network optimization engine 250 may run in kernel space. In anotherembodiment, the network optimization engine 250 may run in user space.In yet another embodiment, a first portion of the network optimizationengine 250 runs in kernel space while a second portion of the networkoptimization engine 250 runs in user space.

Network Packet Processing Engine

The network packet engine 240, also generally referred to as a packetprocessing engine or packet engine, is responsible for controlling andmanaging the processing of packets received and transmitted by appliance200 via network ports 266 and network stack(s) 267. The network packetengine 240 may operate at any layer of the network stack 267. In oneembodiment, the network packet engine 240 operates at layer 2 or layer 3of the network stack 267. In some embodiments, the packet engine 240intercepts or otherwise receives packets at the network layer, such asthe IP layer in a TCP/IP embodiment. In another embodiment, the packetengine 240 operates at layer 4 of the network stack 267. For example, insome embodiments, the packet engine 240 intercepts or otherwise receivespackets at the transport layer, such as intercepting packets as the TCPlayer in a TCP/IP embodiment. In other embodiments, the packet engine240 operates at any session or application layer above layer 4. Forexample, in one embodiment, the packet engine 240 intercepts orotherwise receives network packets above the transport layer protocollayer, such as the payload of a TCP packet in a TCP embodiment.

The packet engine 240 may include a buffer for queuing one or morenetwork packets during processing, such as for receipt of a networkpacket or transmission of a network packet. Additionally, the packetengine 240 is in communication with one or more network stacks 267 tosend and receive network packets via network ports 266. The packetengine 240 may include a packet processing timer. In one embodiment, thepacket processing timer provides one or more time intervals to triggerthe processing of incoming, i.e., received, or outgoing, i.e.,transmitted, network packets. In some embodiments, the packet engine 240processes network packets responsive to the timer. The packet processingtimer provides any type and form of signal to the packet engine 240 tonotify, trigger, or communicate a time related event, interval oroccurrence. In many embodiments, the packet processing timer operates inthe order of milliseconds, such as for example 100 ms, 50 ms, 25 ms, 10ms, 5 ms or 1 ms.

During operations, the packet engine 240 may be interfaced, integratedor be in communication with any portion of the network optimizationengine 250, such as the LAN/WAN detector 210, flow controller 220, QoSengine 236, protocol accelerator 234, compression engine 238, cachemanager 232 and/or policy engine 295′. As such, any of the logic,functions, or operations of the LAN/WAN detector 210, flow controller220, QoS engine 236, protocol accelerator 234, compression engine 238,cache manager 232 and policy engine 295′ may be performed responsive tothe packet processing timer and/or the packet engine 240. In someembodiments, any of the logic, functions, or operations of theencryption engine 234, cache manager 232, policy engine 236 andmulti-protocol compression logic 238 may be performed at the granularityof time intervals provided via the packet processing timer, for example,at a time interval of less than or equal to 10 ms. For example, in oneembodiment, the cache manager 232 may perform expiration of any cachedobjects responsive to the integrated packet engine 240 and/or the packetprocessing timer 242. In another embodiment, the expiry or invalidationtime of a cached object can be set to the same order of granularity asthe time interval of the packet processing timer, such as at every 10ms.

Cache Manager

The cache manager 232 may include software, hardware or any combinationof software and hardware to store data, information and objects to acache in memory or storage, provide cache access, and control and managethe cache. The data, objects or content processed and stored by thecache manager 232 may include data in any format, such as a markuplanguage, or any type of data communicated via any protocol. In someembodiments, the cache manager 232 duplicates original data storedelsewhere or data previously computed, generated or transmitted, inwhich the original data may require longer access time to fetch, computeor otherwise obtain relative to reading a cache memory or storageelement. Once the data is stored in the cache, future use can be made byaccessing the cached copy rather than refetching or recomputing theoriginal data, thereby reducing the access time. In some embodiments,the cache may comprise a data object in memory of the appliance 200. Inanother embodiment, the cache may comprise any type and form of storageelement of the appliance 200, such as a portion of a hard disk. In someembodiments, the processing unit of the device may provide cache memoryfor use by the cache manager 232. In yet further embodiments, the cachemanager 232 may use any portion and combination of memory, storage, orthe processing unit for caching data, objects, and other content.

Furthermore, the cache manager 232 includes any logic, functions, rules,or operations to perform any caching techniques of the appliance 200. Insome embodiments, the cache manager 232 may operate as an application,library, program, service, process, thread or task. In some embodiments,the cache manager 232 can comprise any type of general purpose processor(GPP), or any other type of integrated circuit, such as a FieldProgrammable Gate Array (FPGA), Programmable Logic Device (PLD), orApplication Specific Integrated Circuit (ASIC).

Policy Engine

The policy engine 295′ includes any logic, function or operations forproviding and applying one or more policies or rules to the function,operation or configuration of any portion of the appliance 200. Thepolicy engine 295′ may include, for example, an intelligent statisticalengine or other programmable application(s). In one embodiment, thepolicy engine 295 provides a configuration mechanism to allow a user toidentify, specify, define or configure a policy for the networkoptimization engine 250, or any portion thereof. For example, the policyengine 295 may provide policies for what data to cache, when to cachethe data, for whom to cache the data, when to expire an object in cacheor refresh the cache. In other embodiments, the policy engine 236 mayinclude any logic, rules, functions or operations to determine andprovide access, control and management of objects, data or content beingcached by the appliance 200 in addition to access, control andmanagement of security, network traffic, network access, compression orany other function or operation performed by the appliance 200.

In some embodiments, the policy engine 295′ provides and applies one ormore policies based on any one or more of the following: a user,identification of the client, identification of the server, the type ofconnection, the time of the connection, the type of network, or thecontents of the network traffic. In one embodiment, the policy engine295′ provides and applies a policy based on any field or header at anyprotocol layer of a network packet. In another embodiment, the policyengine 295′ provides and applies a policy based on any payload of anetwork packet. For example, in one embodiment, the policy engine 295′applies a policy based on identifying a certain portion of content of anapplication layer protocol carried as a payload of a transport layerpacket. In another example, the policy engine 295′ applies a policybased on any information identified by a client, server or usercertificate. In yet another embodiment, the policy engine 295′ applies apolicy based on any attributes or characteristics obtained about aclient 102, such as via any type and form of endpoint detection (see forexample the collection agent of the client agent discussed below).

In one embodiment, the policy engine 295′ works in conjunction orcooperation with the policy engine 295 of the application deliverysystem 290. In some embodiments, the policy engine 295′ is a distributedportion of the policy engine 295 of the application delivery system 290.In another embodiment, the policy engine 295 of the application deliverysystem 290 is deployed on or executed on the appliance 200. In someembodiments, the policy engines 295, 295′ both operate on the appliance200. In yet another embodiment, the policy engine 295′, or a portionthereof, of the appliance 200 operates on a server 106.

Multi-Protocol and Multi-Layer Compression Engine

The compression engine 238 includes any logic, business rules, functionor operations for compressing one or more protocols of a network packet,such as any of the protocols used by the network stack 267 of theappliance 200. The compression engine 238 may also be referred to as amulti-protocol compression engine 238 in that it may be designed,constructed or capable of compressing a plurality of protocols. In oneembodiment, the compression engine 238 applies context insensitivecompression, which is compression applied to data without knowledge ofthe type of data. In another embodiment, the compression engine 238applies context-sensitive compression. In this embodiment, thecompression engine 238 utilizes knowledge of the data type to select aspecific compression algorithm from a suite of suitable algorithms. Insome embodiments, knowledge of the specific protocol is used to performcontext-sensitive compression. In one embodiment, the appliance 200 orcompression engine 238 can use port numbers (e.g., well-known ports), aswell as data from the connection itself to determine the appropriatecompression algorithm to use. Some protocols use only a single type ofdata, requiring only a single compression algorithm that can be selectedwhen the connection is established. Other protocols contain differenttypes of data at different times. For example, POP, IMAP, SMTP, and HTTPall move files of arbitrary types interspersed with other protocol data.

In one embodiment, the compression engine 238 uses a delta-typecompression algorithm. In another embodiment, the compression engine 238uses first site compression as well as searching for repeated patternsamong data stored in cache, memory or disk. In some embodiments, thecompression engine 238 uses a lossless compression algorithm. In otherembodiments, the compression engine uses a lossy compression algorithm.In some cases, knowledge of the data type and, sometimes, permissionfrom the user are required to use a lossy compression algorithm. In someembodiments, compression is not limited to the protocol payload. Thecontrol fields of the protocol itself may be compressed. In someembodiments, the compression engine 238 uses a different algorithm forcontrol fields than that used for the payload.

In some embodiments, the compression engine 238 compresses at one ormore layers of the network stack 267. In one embodiment, the compressionengine 238 compresses at a transport layer protocol. In anotherembodiment, the compression engine 238 compresses at an applicationlayer protocol. In some embodiments, the compression engine 238compresses at a layer 2-4 protocol. In other embodiments, thecompression engine 238 compresses at a layer 5-7 protocol. In yetanother embodiment, the compression engine compresses a transport layerprotocol and an application layer protocol. In some embodiments, thecompression engine 238 compresses a layer 2-4 protocol and a layer 5-7protocol.

In some embodiments, the compression engine 238 uses memory-basedcompression, cache-based compression or disk-based compression or anycombination thereof. As such, the compression engine 238 may be referredto as a multi-layer compression engine. In one embodiment, thecompression engine 238 uses a history of data stored in memory, such asRAM. In another embodiment, the compression engine 238 uses a history ofdata stored in a cache, such as L2 cache of the processor. In otherembodiments, the compression engine 238 uses a history of data stored toa disk or storage location. In some embodiments, the compression engine238 uses a hierarchy of cache-based, memory-based and disk-based datahistory. The compression engine 238 may first use the cache-based datato determine one or more data matches for compression, and then maycheck the memory-based data to determine one or more data matches forcompression. In another case, the compression engine 238 may check diskstorage for data matches for compression after checking either thecache-based and/or memory-based data history.

In one embodiment, multi-protocol compression engine 238 compressesbi-directionally between clients 102 a-102 n and servers 106 a-106 n anyTCP/IP based protocol, including Messaging Application ProgrammingInterface (MAPI) (email), File Transfer Protocol (FTP), HyperTextTransfer Protocol (HTTP), Common Internet File System (CIFS) protocol(file transfer), Independent Computing Architecture (ICA) protocol,Remote Desktop Protocol (RDP), Wireless Application Protocol (WAP),Mobile IP protocol, and Voice Over IP (VoIP) protocol. In otherembodiments, multi-protocol compression engine 238 provides compressionof HyperText Markup Language (HTML) based protocols and in someembodiments, provides compression of any markup languages, such as theExtensible Markup Language (XML). In one embodiment, the multi-protocolcompression engine 238 provides compression of any high-performanceprotocol, such as any protocol designed for appliance 200 to appliance200 communications. In another embodiment, the multi-protocolcompression engine 238 compresses any payload of or any communicationusing a modified transport control protocol, such as Transaction TCP(T/TCP), TCP with selection acknowledgements (TCP-SACK), TCP with largewindows (TCP-LW), a congestion prediction protocol such as the TCP-Vegasprotocol, and a TCP spoofing protocol.

As such, the multi-protocol compression engine 238 may accelerateperformance for users accessing applications via desktop clients, e.g.,Microsoft Outlook and non-Web thin clients, such as any client launchedby popular enterprise applications like Oracle, SAP and Siebel, and evenmobile clients, such as the Pocket PC. In some embodiments, themulti-protocol compression engine by integrating with packet processingengine 240 accessing the network stack 267 is able to compress any ofthe protocols carried by a transport layer protocol, such as anyapplication layer protocol.

LAN/WAN Detector

The LAN/WAN detector 238 includes any logic, business rules, function oroperations for automatically detecting a slow side connection (e.g., awide area network (WAN) connection such as an Intranet) and associatedport 267, and a fast side connection (e.g., a local area network (LAN)connection) and an associated port 267. In some embodiments, the LAN/WANdetector 238 monitors network traffic on the network ports 267 of theappliance 200 to detect a synchronization packet, sometimes referred toas a “tagged” network packet. The synchronization packet identifies atype or speed of the network traffic. In one embodiment, thesynchronization packet identifies a WAN speed or WAN type connection.The LAN/WAN detector 238 also identifies receipt of an acknowledgementpacket to a tagged synchronization packet and on which port it isreceived. The appliance 200 then configures itself to operate theidentified port on which the tagged synchronization packet arrived sothat the speed on that port is set to be the speed associated with thenetwork connected to that port. The other port is then set to the speedassociated with the network connected to that port.

For ease of discussion herein, reference to “slow” side will be madewith respect to connection with a wide area network (WAN), e.g., theInternet, and operating at a network speed of the WAN. Likewise,reference to “fast” side will be made with respect to connection with alocal area network (LAN) and operating at a network speed the LAN.However, it is noted that “fast” and “slow” sides in a network canchange on a per-connection basis and are relative terms to the speed ofthe network connections or to the type of network topology. Suchconfigurations are useful in complex network topologies, where a networkis “fast” or “slow” only when compared to adjacent networks and not inany absolute sense.

In one embodiment, the LAN/WAN detector 238 may be used to allow forauto-discovery by an appliance 200 of a network to which it connects. Inanother embodiment, the LAN/WAN detector 238 may be used to detect theexistence or presence of a second appliance 200′ deployed in the network104. For example, an auto-discovery mechanism in operation in accordancewith FIG. 1A functions as follows: appliance 200 and 200′ are placed inline with the connection linking client 102 and server 106. Theappliances 200 and 200′ are at the ends of a low-speed link, e.g.,Internet, connecting two LANs. In one example embodiment, appliances 200and 200′ each include two ports—one to connect with the “lower” speedlink and the other to connect with a “higher” speed link, e.g., a LAN.Any packet arriving at one port is copied to the other port. Thus,appliance 200 and 200′ are each configured to function as a bridgebetween the two networks 104.

When an end node, such as the client 102, opens a new TCP connectionwith another end node, such as the server 106, the client 102 sends aTCP packet with a synchronization (SYN) header bit set, or a SYN packet,to the server 106. In the present example, client 102 opens a transportlayer connection to server 106. When the SYN packet passes throughappliance 200, the appliance 200 inserts, attaches or otherwise providesa characteristic TCP header option to the packet, which announces itspresence. If the packet passes through a second appliance, in thisexample appliance 200′ the second appliance notes the header option onthe SYN packet. The server 106 responds to the SYN packet with asynchronization acknowledgment (SYN-ACK) packet. When the SYN-ACK packetpasses through appliance 200′, a TCP header option is tagged (e.g.,attached, inserted or added) to the SYN-ACK packet to announce appliance200′ presence to appliance 200. When appliance 200 receives this packet,both appliances 200, 200′ are now aware of each other and the connectioncan be appropriately accelerated.

Further to the operations of the LAN/WAN detector 238, a method orprocess for detecting “fast” and “slow” sides of a network using a SYNpacket is described. During a transport layer connection establishmentbetween a client 102 and a server 106, the appliance 200 via the LAN/WANdetector 238 determines whether the SYN packet is tagged with anacknowledgement (ACK). If it is tagged, the appliance 200 identifies orconfigures the port receiving the tagged SYN packet (SYN-ACK) as the“slow” side. In one embodiment, the appliance 200 optionally removes theACK tag from the packet before copying the packet to the other port. Ifthe LAN/WAN detector 238 determines that the packet is not tagged, theappliance 200 identifies or configure the port receiving the untaggedpacket as the “fast” side. The appliance 200 then tags the SYN packetwith an ACK and copies the packet to the other port.

In another embodiment, the LAN/WAN detector 238 detects fast and slowsides of a network using a SYN-ACK packet. The appliance 200 via theLAN/WAN detector 238 determines whether the SYN-ACK packet is taggedwith an acknowledgement (ACK). If it is tagged, the appliance 200identifies or configures the port receiving the tagged SYN packet(SYN-ACK) as the “slow” side. In one embodiment, the appliance 200optionally removes the ACK tag from the packet before copying the packetto the other port. If the LAN/WAN detector 238 determines that thepacket is not tagged, the appliance 200 identifies or configures theport receiving the untagged packet as the “fast” side. The LAN/WANdetector 238 determines whether the SYN packet was tagged. If the SYNpacket was not tagged, the appliance 200 copied the packet to the otherport. If the SYN packet was tagged, the appliance tags the SYN-ACKpacket before copying it to the other port.

The appliance 200, 200′ may add, insert, modify, attach or otherwiseprovide any information or data in the TCP option header to provide anyinformation, data or characteristics about the network connection,network traffic flow, or the configuration or operation of the appliance200. In this manner, not only does an appliance 200 announce itspresence to another appliance 200′ or tag a higher or lower speedconnection, the appliance 200 provides additional information and datavia the TCP option headers about the appliance or the connection. TheTCP option header information may be useful to or used by an appliancein controlling, managing, optimizing, acceleration or improving thenetwork traffic flow traversing the appliance 200, or to otherwiseconfigure itself or operation of a network port.

Although generally described in conjunction with detecting speeds ofnetwork connections or the presence of appliances, the LAN/WAN detector238 can be used for applying any type of function, logic or operation ofthe appliance 200 to a port, connection or flow of network traffic. Inparticular, automated assignment of ports can occur whenever a deviceperforms different functions on different ports, where the assignment ofa port to a task can be made during the unit's operation, and/or thenature of the network segment on each port is discoverable by theappliance 200.

Flow Control

The flow controller 220 includes any logic, business rules, function oroperations for optimizing, accelerating or otherwise improving theperformance, operation or quality of service of transport layercommunications of network packets or the delivery of packets at thetransport layer. A flow controller, also sometimes referred to as a flowcontrol module, regulates, manages and controls data transfer rates. Insome embodiments, the flow controller 220 is deployed at or connected ata bandwidth bottleneck in the network 104. In one embodiment, the flowcontroller 220 effectively regulates, manages and controls bandwidthusage or utilization. In other embodiments, the flow control modules mayalso be deployed at points on the network of latency transitions (lowlatency to high latency) and on links with media losses (such aswireless or satellite links).

In some embodiments, a flow controller 220 may include a receiver-sideflow control module for controlling the rate of receipt of networktransmissions and a sender-side flow control module for the controllingthe rate of transmissions of network packets. In other embodiments, afirst flow controller 220 includes a receiver-side flow control moduleand a second flow controller 220′ includes a sender-side flow controlmodule. In some embodiments, a first flow controller 220 is deployed ona first appliance 200 and a second flow controller 220′ is deployed on asecond appliance 200′. As such, in some embodiments, a first appliance200 controls the flow of data on the receiver side and a secondappliance 200′ controls the data flow from the sender side. In yetanother embodiment, a single appliance 200 includes flow control forboth the receiver-side and sender-side of network communicationstraversing the appliance 200.

In one embodiment, a flow control module 220 is configured to allowbandwidth at the bottleneck to be more fully utilized, and in someembodiments, not overutilized. In some embodiments, the flow controlmodule 220 transparently buffers (or rebuffers data already buffered by,for example, the sender) network sessions that pass between nodes havingassociated flow control modules 220. When a session passes through twoor more flow control modules 220, one or more of the flow controlmodules controls a rate of the session(s).

In one embodiment, the flow control module 200 is configured withpredetermined data relating to bottleneck bandwidth. In anotherembodiment, the flow control module 220 may be configured to detect thebottleneck bandwidth or data associated therewith. A receiver-side flowcontrol module 220 may control the data transmission rate. Thereceiver-side flow control module controls 220 the sender-side flowcontrol module, e.g., 220, data transmission rate by forwardingtransmission rate limits to the sender-side flow control module 220. Inone embodiment, the receiver-side flow control module 220 piggybacksthese transmission rate limits on acknowledgement (ACK) packets (orsignals) sent to the sender, e.g., client 102, by the receiver, e.g.,server 106. The receiver-side flow control module 220 does this inresponse to rate control requests that are sent by the sender side flowcontrol module 220′. The requests from the sender-side flow controlmodule 220′ may be “piggybacked” on data packets sent by the sender 106.

In some embodiments, the flow controller 220 manipulates, adjusts,simulates, changes, improves or otherwise adapts the behavior of thetransport layer protocol to provide improved performance or operationsof delivery, data rates and/or bandwidth utilization of the transportlayer. The flow controller 220 may implement a plurality of data flowcontrol techniques at the transport layer, including but not limitedto 1) pre-acknowledgements, 2) window virtualization, 3) recongestiontechniques, 3) local retransmission techniques, 4) wavefront detectionand disambiguation, 5) transport control protocol selectiveacknowledgements, 6) transaction boundary detection techniques and 7)repacketization.

Although a sender may be generally described herein as a client 102 anda receiver as a server 106, a sender may be any end point such as aserver 106 or any computing device 100 on the network 104. Likewise, areceiver may be a client 102 or any other computing device on thenetwork 104.

Pre-Acknowledgements

In brief overview of a pre-acknowledgement flow control technique, theflow controller 220, in some embodiments, handles the acknowledgementsand retransmits for a sender, effectively terminating the sender'sconnection with the downstream portion of a network connection. Inreference to FIG. 1B, one possible deployment of an appliance 200 into anetwork architecture to implement this feature is depicted. In thisexample environment, a sending computer or client 102 transmits data onnetwork 104, for example, via a switch, which determines that the datais destined for VPN appliance 205. Because of the chosen networktopology, all data destined for VPN appliance 205 traverses appliance200, so the appliance 200 can apply any necessary algorithms to thisdata.

Continuing further with the example, the client 102 transmits a packet,which is received by the appliance 200. When the appliance 200 receivesthe packet, which is transmitted from the client 102 to a recipient viathe VPN appliance 205, the appliance 200 retains a copy of the packetand forwards the packet downstream to the VPN appliance 205. Theappliance 200 then generates an acknowledgement packet (ACK) and sendsthe ACK packet back to the client 102 or sending endpoint. This ACK, apre-acknowledgment, causes the sender 102 to believe that the packet hasbeen delivered successfully, freeing the sender's resources forsubsequent processing. The appliance 200 retains the copy of the packetdata in the event that a retransmission of the packet is required, sothat the sender 102 does not have to handle retransmissions of the data.This early generation of acknowledgements may be called “preacking.”

If a retransmission of the packet is required, the appliance 200retransmits the packet to the sender. The appliance 200 may determinewhether retransmission is required as a sender would in a traditionalsystem, for example, determining that a packet is lost if anacknowledgement has not been received for the packet after apredetermined amount of time. To this end, the appliance 200 monitorsacknowledgements generated by the receiving endpoint, e.g., server 106(or any other downstream network entity) so that it can determinewhether the packet has been successfully delivered or needs to beretransmitted. If the appliance 200 determines that the packet has beensuccessfully delivered, the appliance 200 is free to discard the savedpacket data. The appliance 200 may also inhibit forwardingacknowledgements for packets that have already been received by thesending endpoint.

In the embodiment described above, the appliance 200 via the flowcontroller 220 controls the sender 102 through the delivery ofpre-acknowledgements, also referred to as “preacks”, as though theappliance 200 was a receiving endpoint itself. Since the appliance 200is not an endpoint and does not actually consume the data, the appliance200 includes a mechanism for providing overflow control to the sendingendpoint. Without overflow control, the appliance 200 could run out ofmemory because the appliance 200 stores packets that have been preackedto the sending endpoint but not yet acknowledged as received by thereceiving endpoint. Therefore, in a situation in which the sender 102transmits packets to the appliance 200 faster than the appliance 200 canforward the packets downstream, the memory available in the appliance200 to store unacknowledged packet data can quickly fill. A mechanismfor overflow control allows the appliance 200 to control transmission ofthe packets from the sender 102 to avoid this problem.

In one embodiment, the appliance 200 or flow controller 220 includes aninherent “self-clocking” overflow control mechanism. This self-clockingis due to the order in which the appliance 200 may be designed totransmit packets downstream and send ACKs to the sender 102 or 106. Insome embodiments, the appliance 200 does not preack the packet untilafter it transmits the packet downstream. In this way, the sender 102will receive the ACKs at the rate at which the appliance 200 is able totransmit packets rather than the rate at which the appliance 200receives packets from the sender 100. This helps to regulate thetransmission of packets from a sender 102.

Window Virtualization

Another overflow control mechanism that the appliance 200 may implementis to use the TCP window size parameter, which tells a sender how muchbuffer the receiver is permitting the sender to fill up. A nonzerowindow size (e.g., a size of at least one Maximum Segment Size (MSS)) ina preack permits the sending endpoint to continue to deliver data to theappliance, whereas a zero window size inhibits further datatransmission. Accordingly, the appliance 200 may regulate the flow ofpackets from the sender, for example when the appliance's 200 buffer isbecoming full, by appropriately setting the TCP window size in eachpreack.

Another technique to reduce this additional overhead is to applyhysteresis. When the appliance 200 delivers data to the slower side, theoverflow control mechanism in the appliance 200 can require that aminimum amount of space be available before sending a nonzero windowadvertisement to the sender. In one embodiment, the appliance 200 waitsuntil there is a minimum of a predetermined number of packets, such asfour packets, of space available before sending a nonzero window packet,such as a packet indicating a window size of four packets. This mayreduce the overhead by approximately a factor of four, since only twoACK packets are sent for each group of four data packets, instead ofeight ACK packets for four data packets.

Another technique the appliance 200 or flow controller 220 may use foroverflow control is the TCP delayed ACK mechanism, which skips ACKs toreduce network traffic. The TCP delayed ACKs automatically delay thesending of an ACK, either until two packets are received or until afixed timeout has occurred. This mechanism alone can result in cuttingthe overhead in half; moreover, by increasing the numbers of packetsabove two, additional overhead reduction is realized. But merelydelaying the ACK itself may be insufficient to control overflow, and theappliance 200 may also use the advertised window mechanism on the ACKsto control the sender. When doing this, the appliance 200 in oneembodiment avoids triggering the timeout mechanism of the sender bydelaying the ACK too long.

In one embodiment, the flow controller 220 does not preack the lastpacket of a group of packets. By not preacking the last packet, or atleast one of the packets in the group, the appliance avoids a falseacknowledgement for a group of packets. For example, if the appliancewere to send a preack for a last packet and the packet were subsequentlylost, the sender would have been tricked into thinking that the packetis delivered when it was not. Thinking that the packet had beendelivered, the sender could discard that data. If the appliance alsolost the packet, there would be no way to retransmit the packet to therecipient. By not preacking the last packet of a group of packets, thesender will not discard the packet until it has been delivered.

In another embodiment, the flow controller 220 may use a windowvirtualization technique to control the rate of flow or bandwidthutilization of a network connection. Though it may not immediately beapparent from examining conventional literature such as RFC 1323, thereis effectively a send window for transport layer protocols such as TCP.The send window is similar to the receive window, in that it consumesbuffer space (though on the sender). The sender's send window consistsof all data sent by the application that has not been acknowledged bythe receiver. This data must be retained in memory in caseretransmission is required. Since memory is a shared resource, some TCPstack implementations limit the size of this data. When the send windowis full, an attempt by an application program to send more data resultsin blocking the application program until space is available. Subsequentreception of acknowledgements will free send-window memory and unblockthe application program. This window size is known as the socket buffersize in some TCP implementations.

In one embodiment, the flow control module 220 is configured to provideaccess to increased window (or buffer) sizes. This configuration mayalso be referenced to as window virtualization. In an embodimentincluding TCP as the transport layer protocol, the TCP header mayinclude a bit string corresponding to a window scale. In one embodiment,“window” may be referenced in a context of send, receive, or both.

One embodiment of window virtualization is to insert a preackingappliance 200 into a TCP session. In reference to any of theenvironments of FIG. 1A or 1B, initiation of a data communicationsession between a source node, e.g., client 102 (for ease of discussion,now referenced as source node 102), and a destination node, e.g., server106 (for ease of discussion, now referenced as destination node 106) isestablished. For TCP communications, the source node 102 initiallytransmits a synchronization signal (“SYN”) through its local areanetwork 104 to first flow control module 220. The first flow controlmodule 220 inserts a configuration identifier into the TCP headeroptions area. The configuration identifier identifies this point in thedata path as a flow control module.

The appliances 200 via a flow control module 220 provide window (orbuffer) to allow increasing data buffering capabilities within a sessiondespite having end nodes with small buffer sizes, e.g., typically 16 kbytes. However, RFC 1323 requires window scaling for any buffer sizesgreater than 64 k bytes, which must be set at the time of sessioninitialization (SYN, SYN-ACK signals). Moreover, the window scalingcorresponds to the lowest common denominator in the data path, often anend node with small buffer size. This window scale often is a scale of 0or 1, which corresponds to a buffer size of up to 64 k or 128 k bytes.Note that because the window size is defined as the window field in eachpacket shifted over by the window scale, the window scale establishes anupper limit for the buffer, but does not guarantee the buffer isactually that large. Each packet indicates the current available bufferspace at the receiver in the window field.

In one embodiment of scaling using the window virtualization technique,during connection establishment (i.e., initialization of a session) whenthe first flow control module 220 receives from the source node 102 theSYN signal (or packet), the flow control module 220 stores the windowsscale of the source node 102 (which is the previous node) or stores a 0for window scale if the scale of the previous node is missing. The firstflow control module 220 also modifies the scale, e.g., increases thescale to 4 from 0 or 1, in the SYN-FCM signal. When the second flowcontrol module 220 receives the SYN signal, it stores the increasedscale from the first flow control signal and resets the scale in the SYNsignal back to the source node 103 scale value for transmission to thedestination node 106. When the second flow controller 220 receives theSYN-ACK signal from the destination node 106, it stores the scale fromthe destination node 106 scale, e.g., 0 or 1, and modifies it to anincreased scale that is sent with the SYN-ACK-FCM signal. The first flowcontrol node 220 receives and notes the received window scale andrevises the windows scale sent back to the source node 102 back down tothe original scale, e.g., 0 or 1. Based on the above window shiftconversation during connection establishment, the window field in everysubsequent packet, e.g., TCP packet, of the session must be shiftedaccording to the window shift conversion.

The window scale, as described above, expresses buffer sizes of over 64k and may not be required for window virtualization. Thus, shifts forwindow scale may be used to express increased buffer capacity in eachflow control module 220. This increase in buffer capacity in may bereferenced as window (or buffer) virtualization. The increase in buffersize allows greater packet throughput from and to the respective endnodes 102 and 106. Note that buffer sizes in TCP are typically expressedin terms of bytes, but for ease of discussion “packets” may be used inthe description herein as it relates to virtualization.

By way of example, a window (or buffer) virtualization performed by theflow controller 220 is described. In this example, the source node 102and the destination node 106 are configured similar to conventional endnodes having a limited buffer capacity of 16 k bytes, which equalsapproximately 10 packets of data. Typically, an end node 102, 106 mustwait until the packet is transmitted and confirmation is received beforea next group of packets can be transmitted. In one embodiment, usingincreased buffer capacity in the flow control modules 220, when thesource node 103 transmits its data packets, the first flow controlmodule 220 receives the packets, stores it in its larger capacitybuffer, e.g., 512 packet capacity, and immediately sends back anacknowledgement signal indicating receipt of the packets (“REC-ACK”)back to the source node 102. The source node 102 can then “flush” itscurrent buffer, load the buffer with 10 new data packets, and transmitthose onto the first flow control module 220. Again, the first flowcontrol module 220 transmits a REC-ACK signal back to the source node102 and the source node 102 flushes its buffer and loads it with 10 morenew packets for transmission.

As the first flow control module 220 receives the data packets from thesource nodes, it loads up its buffer accordingly. When it is ready thefirst flow control module 220 can begin transmitting the data packets tothe second flow control module 230, which also has an increased buffersize, for example, to receive 512 packets. The second flow controlmodule 220′ receives the data packets and begins to transmit 10 packetsat a time to the destination node 106. Each REC-ACK received at thesecond flow control node 220 from the destination node 106 results in 10more packets being transmitted to the destination node 106 until all thedata packets are transferred. Hence, the present invention is able toincrease data transmission throughput between the source node (sender)102 and the destination node (receiver) 106 by taking advantage of thelarger buffer in the flow control modules 220, 220′ between the devices.

It is noted that by “preacking” the transmission of data as describedpreviously, a sender (or source node 102) is allowed to transmit moredata than is possible without the preacks, thus affecting a largerwindow size. For example, in one embodiment this technique is effectivewhen the flow control module 220, 220′ is located “near” a node (e.g.,source node 102 or destination node 106) that lacks large windows.

Recongestion

Another technique or algorithm of the flow controller 220 is referred toas recongestion. The standard TCP congestion avoidance algorithms areknown to perform poorly in the face of certain network conditions,including: large RTTs (round trip times), high packet loss rates, andothers. When the appliance 200 detects a congestion condition such aslong round trip times or high packet loss, the appliance 200 intervenes,substituting an alternate congestion avoidance algorithm that bettersuits the particular network condition. In one embodiment, therecongestion algorithm uses preacks to effectively terminate theconnection between the sender and the receiver. The appliance 200 thenresends the packets from itself to the receiver, using a differentcongestion avoidance algorithm. Recongestion algorithms may be dependenton the characteristics of the TCP connection. The appliance 200 monitorseach TCP connection, characterizing it with respect to the differentdimensions, selecting a recongestion algorithm that is appropriate forthe current characterization.

In one embodiment, upon detecting a TCP connection that is limited byround trip times (RTT), a recongestion algorithm is applied whichbehaves as multiple TCP connections. Each TCP connection operates withinits own performance limit but the aggregate bandwidth achieves a higherperformance level. One parameter in this mechanism is the number ofparallel connections that are applied (N). Too large a value of N andthe connection bundle achieves more than its fair share of bandwidth.Too small a value of N and the connection bundle achieves less than itsfair share of bandwidth. One method of establishing “N” relies on theappliance 200 monitoring the packet loss rate, RTT, and packet size ofthe actual connection. These numbers are plugged into a TCP responsecurve formula to provide an upper limit on the performance of a singleTCP connection in the present configuration. If each connection withinthe connection bundle is achieving substantially the same performance asthat computed to be the upper limit, then additional parallelconnections are applied. If the current bundle is achieving lessperformance than the upper limit, the number of parallel connections isreduced. In this manner, the overall fairness of the system ismaintained since individual connection bundles contain no moreparallelism than is required to eliminate the restrictions imposed bythe protocol itself. Furthermore, each individual connection retains TCPcompliance.

Another method of establishing “N” is to utilize a parallel flow controlalgorithm such as the TCP “Vegas” algorithm or the TCP “StabilizedVegas” algorithm. In this method, the network information associatedwith the connections in the connection bundle (e.g., RTT, loss rate,average packet size, etc.) is aggregated and applied to the alternateflow control algorithm. The results of this algorithm are in turndistributed among the connections of the bundle controlling their number(i.e., N). Optionally, each connection within the bundle continues usingthe standard TCP congestion avoidance algorithm.

In another embodiment, the individual connections within a parallelbundle are virtualized, i.e., actual individual TCP connections are notestablished. Instead the congestion avoidance algorithm is modified tobehave as though there were N parallel connections. This method has theadvantage of appearing to transiting network nodes as a singleconnection. Thus the QOS, security and other monitoring methods of thesenodes are unaffected by the recongestion algorithm. In yet anotherembodiment, the individual connections within a parallel bundle arereal, i.e., a separate. TCP connection is established for each of theparallel connections within a bundle. The congestion avoidance algorithmfor each TCP connection need not be modified.

Retransmission

In some embodiments, the flow controller 220 may apply a localretransmission technique. One reason for implementing preacks is toprepare to transmit to a high-loss link (e.g., wireless). In theseembodiments, the preacking appliance 200 or flow control module 220 islocated most beneficially “before” the wireless link. This allowsretransmissions to be performed closer to the high loss link, removingthe retransmission burden from the remainder of the network. Theappliance 200 may provide local retransmission, in which case, packetsdropped due to failures of the link are retransmitted directly by theappliance 200. This is advantageous because it eliminates theretransmission burden upon an end node, such as server 106, andinfrastructure of any of the networks 104. With appliance 200 providinglocal retransmissions, the dropped packet can be retransmitted acrossthe high loss link without necessitating a retransmit by an end node anda corresponding decrease in the rate of data transmission from the endnode.

Another reason for implementing preacks is to avoid a receive time out(RTO) penalty. In standard TCP there are many situations that result inan RTO, even though a large percentage of the packets in flight weresuccessfully received. With standard TCP algorithms, dropping more thanone packet within an RTT window would likely result in a timeout.Additionally, most TCP connections experience a timeout if aretransmitted packet is dropped. In a network with a high bandwidthdelay product, even a relatively small packet loss rate will causefrequent Retransmission timeouts (RTOs). In one embodiment, theappliance 200 uses a retransmit and timeout algorithm is avoid prematureRTOs. The appliance 200 or flow controller 220 maintains a count ofretransmissions is maintained on a per-packet basis. Each time that apacket is retransmitted, the count is incremented by one and theappliance 200 continues to transmit packets. In some embodiments, onlyif a packet has been retransmitted a predetermined number of times is anRTO declared.

Wavefront Detection and Disambiguation

In some embodiments, the appliance 200 or flow controller 220 useswavefront detection and disambiguation techniques in managing andcontrolling flow of network traffic. In this technique, the flowcontroller 220 uses transmit identifiers or numbers to determine whetherparticular data packets need to be retransmitted. By way of example, asender transmits data packets over a network, where each instance of atransmitted data packet is associated with a transmit number. It can beappreciated that the transmit number for a packet is not the same as thepacket's sequence number, since a sequence number references the data inthe packet while the transmit number references an instance of atransmission of that data. The transmit number can be any informationusable for this purpose, including a timestamp associated with a packetor simply an increasing number (similar to a sequence number or a packetnumber). Because a data segment may be retransmitted, different transmitnumbers may be associated with a particular sequence number.

As the sender transmits data packets, the sender maintains a datastructure of acknowledged instances of data packet transmissions. Eachinstance of a data packet transmission is referenced by its sequencenumber and transmit number. By maintaining a transmit number for eachpacket, the sender retains the ordering of the transmission of datapackets. When the sender receives an ACK or a SACK, the senderdetermines the highest transmit number associated with packets that thereceiver indicated has arrived (in the received acknowledgement). Anyoutstanding unacknowledged packets with lower transmit numbers arepresumed lost.

In some embodiments, the sender is presented with an ambiguous situationwhen the arriving packet has been retransmitted: a standard ACK/SACKdoes not contain enough information to allow the sender to determinewhich transmission of the arriving packet has triggered theacknowledgement. After receiving an ambiguous acknowledgement,therefore, the sender disambiguates the acknowledgement to associate itwith a transmit number. In various embodiments, one or a combination ofseveral techniques may be used to resolve this ambiguity.

In one embodiment, the sender includes an identifier with a transmitteddata packet, and the receiver returns that identifier or a functionthereof with the acknowledgement. The identifier may be a timestamp(e.g., a TCP timestamp as described in RFC 1323), a sequential number,or any other information that can be used to resolve between two or moreinstances of a packet's transmission. In an embodiment in which the TCPtimestamp option is used to disambiguate the acknowledgement, eachpacket is tagged with up to 32-bits of unique information. Upon receiptof the data packet, the receiver echoes this unique information back tothe sender with the acknowledgement. The sender ensures that theoriginally sent packet and its retransmitted version or versions containdifferent values for the timestamp option, allowing it to unambiguouslyeliminate the ACK ambiguity. The sender may maintain this uniqueinformation, for example, in the data structure in which it stores thestatus of sent data packets. This technique is advantageous because itcomplies with industry standards and is thus likely to encounter littleor no interoperability issues. However, this technique may require tenbytes of TCP header space in some implementations, reducing theeffective throughput rate on the network and reducing space availablefor other TCP options.

In another embodiment, another field in the packet, such as the IP IDfield, is used to disambiguate in a way similar to the TCP timestampoption described above. The sender arranges for the ID field values ofthe original and the retransmitted version or versions of the packet tohave different ID fields in the IP header. Upon reception of the datapacket at the receiver, or a proxy device thereof, the receiver sets theID field of the ACK packet to a function of the ID field of the packetthat triggers the ACK. This method is advantageous, as it requires noadditional data to be sent, preserving the efficiency of the network andTCP header space. The function chosen should provide a high degree oflikelihood of providing disambiguation. In a preferred embodiment, thesender selects IP ID values with the most significant bit set to 0. Whenthe receiver responds, the IP ID value is set to the same IP ID valuewith the most significant bit set to a one.

In another embodiment, the transmit numbers associated withnon-ambiguous acknowledgements are used to disambiguate an ambiguousacknowledgement. This technique is based on the principle thatacknowledgements for two packets will tend to be received closer in timeas the packets are transmitted closer in time. Packets that are notretransmitted will not result in ambiguity, as the acknowledgementsreceived for such packets can be readily associated with a transmitnumber. Therefore, these known transmit numbers are compared to thepossible transmit numbers for an ambiguous acknowledgement received nearin time to the known acknowledgement. The sender compares the transmitnumbers of the ambiguous acknowledgement against the last known receivedtransmit number, selecting the one closest to the known receivedtransmit number. For example, if an acknowledgement for data packet 1 isreceived and the last received acknowledgement was for data packet 5,the sender resolves the ambiguity by assuming that the third instance ofdata packet 1 caused the acknowledgement.

Selective Acknowledgements

Another technique of the appliance 200 or flow controller 220 is toimplement an embodiment of transport control protocol selectiveacknowledgements, or TCP SACK, to determine what packets have or havenot been received. This technique allows the sender to determineunambiguously a list of packets that have been received by the receiveras well as an accurate list of packets not received. This functionalitymay be implemented by modifying the sender and/or receiver, or byinserting sender- and receiver-side flow control modules 220 in thenetwork path between the sender and receiver. In reference to FIG. 1A orFIG. 1B, a sender, e.g., client 102, is configured to transmit datapackets to the receiver, e.g., server 106, over the network 104. Inresponse, the receiver returns a TCP Selective Acknowledgment option,referred to as SACK packet to the sender. In one embodiment, thecommunication is bi-directional, although only one direction ofcommunication is discussed here for simplicity. The receiver maintains alist, or other suitable data structure, that contains a group of rangesof sequence numbers for data packets that the receiver has actuallyreceived. In some embodiments, the list is sorted by sequence number inan ascending or descending order. The receiver also maintains a left-offpointer, which comprises a reference into the list and indicates theleft-off point from the previously generated SACK packet.

Upon reception of a data packet, the receiver generates and transmits aSACK packet back to the sender. In some embodiments, the SACK packetincludes a number of fields, each of which can hold a range of sequencenumbers to indicate a set of received data packets. The receiver fillsthis first field of the SACK packet with a range of sequence numbersthat includes the landing packet that triggered the SACK packet. Theremaining available SACK fields are filled with ranges of sequencenumbers from the list of received packets. As there are more ranges inthe list than can be loaded into the SACK packet, the receiver uses theleft-off pointer to determine which ranges are loaded into the SACKpacket. The receiver inserts the SACK ranges consecutively from thesorted list, starting from the range referenced by the pointer andcontinuing down the list until the available SACK range space in the TCPheader of the SACK packet is consumed. The receiver wraps around to thestart of the list if it reaches the end. In some embodiments, two orthree additional SACK ranges can be added to the SACK range information.

Once the receiver generates the SACK packet, the receiver sends theacknowledgement back to the sender. The receiver then advances theleft-off pointer by one or more SACK range entries in the list. If thereceiver inserts four SACK ranges, for example, the left-off pointer maybe advanced two SACK ranges in the list. When the advanced left-offpointer reaches at the end of the list, the pointer is reset to thestart of the list, effectively wrapping around the list of knownreceived ranges. Wrapping around the list enables the system to performwell, even in the presence of large losses of SACK packets, since theSACK information that is not communicated due to a lost SACK packet willeventually be communicated once the list is wrapped around.

It can be appreciated, therefore, that a SACK packet may communicateseveral details about the condition of the receiver. First, the SACKpacket indicates that, upon generation of the SACK packet, the receiverhad just received a data packet that is within the first field of theSACK information. Secondly, the second and subsequent fields of the SACKinformation indicate that the receiver has received the data packetswithin those ranges. The SACK information also implies that the receiverhad not, at the time of the SACK packet's generation, received any ofthe data packets that fall between the second and subsequent fields ofthe SACK information. In essence, the ranges between the second andsubsequent ranges in the SACK information are “holes” in the receiveddata, the data therein known not to have been delivered. Using thismethod, therefore, when a SACK packet has sufficient space to includemore than two SACK ranges, the receiver may indicate to the sender arange of data packets that have not yet been received by the receiver.

In another embodiment, the sender uses the SACK packet described abovein combination with the retransmit technique described above to makeassumptions about which data packets have been delivered to thereceiver. For example, when the retransmit algorithm (using the transmitnumbers) declares a packet lost, the sender considers the packet to beonly conditionally lost, as it is possible that the SACK packetidentifying the reception of this packet was lost rather than the datapacket itself. The sender thus adds this packet to a list of potentiallylost packets, called the presumed lost list. Each time a SACK packetarrives, the known missing ranges of data from the SACK packet arecompared to the packets in the presumed lost list. Packets that containdata known to be missing are declared actually lost and are subsequentlyretransmitted. In this way, the two schemes are combined to give thesender better information about which packets have been lost and need tobe retransmitted.

Transaction Boundary Detection

In some embodiments, the appliance 200 or flow controller 220 applies atechnique referred to as transaction boundary detection. In oneembodiment, the technique pertains to ping-pong behaved connections. Atthe TCP layer, ping-pong behavior is when one communicant—a sender—sendsdata and then waits for a response from the other communicant—thereceiver. Examples of ping-pong behavior include remote procedure call,HTTP and others. The algorithms described above use retransmissiontimeout (RTO) to recover from the dropping of the last packet or packetsassociated with the transaction. Since the TCP RTO mechanism isextremely coarse in some embodiments, for example requiring a minimumone second value in all cases), poor application behavior may be seen inthese situations.

In one embodiment, the sender of data or a flow control module 220coupled to the sender detects a transaction boundary in the data beingsent. Upon detecting a transaction boundary, the sender or a flowcontrol module 220 sends additional packets, whose reception generatesadditional ACK or SACK responses from the receiver. Insertion of theadditional packets is preferably limited to balance between improvedapplication response time and network capacity utilization. The numberof additional packets that is inserted may be selected according to thecurrent loss rate associated with that connection, with more packetsselected for connections having a higher loss rate.

One method of detecting a transaction boundary is time based. If thesender has been sending data and ceases, then after a period of time thesender or flow control module 200 declares a transaction boundary. Thismay be combined with other techniques. For example, the setting of thePSH (TCP Push) bit by the sender in the TCP header may indicate atransaction boundary. Accordingly, combining the time-based approachwith these additional heuristics can provide for more accurate detectionof a transaction boundary. In another technique, if the sender or flowcontrol module 220 understands the application protocol, it can parsethe protocol data stream and directly determine transaction boundaries.In some embodiment, this last behavior can be used independent of anytime-based mechanism.

Responsive to detecting a transaction boundary, the sender or flowcontrol module 220 transmits additional data packets to the receiver tocause acknowledgements therefrom. The additional data packets shouldtherefore be such that the receiver will at least generate an ACK orSACK in response to receiving the data packet. In one embodiment, thelast packet or packets of the transaction are simply retransmitted. Thishas the added benefit of retransmitting needed data if the last packetor packets had been dropped, as compared to merely sending dummy datapackets. In another embodiment, fractions of the last packet or packetsare sent, allowing the sender to disambiguate the arrival of thesepackets from their original packets. This allows the receiver to avoidfalsely confusing any reordering adaptation algorithms. In anotherembodiment, any of a number of well-known forward error correctiontechniques can be used to generate additional data for the insertedpackets, allowing for the reconstruction of dropped or otherwise missingdata at the receiver.

In some embodiments, the boundary detection technique described hereinhelps to avoid a timeout when the acknowledgements for the last datapackets in a transaction are dropped. When the sender or flow controlmodule 220 receives the acknowledgements for these additional datapackets, the sender can determine from these additional acknowledgementswhether the last data packets have been received or need to beretransmitted, thus avoiding a timeout. In one embodiment, if the lastpackets have been received but their acknowledgements were dropped, aflow control module 220 generates an acknowledgement for the datapackets and sends the acknowledgement to the sender, thus communicatingto the sender that the data packets have been delivered. In anotherembodiment, if the last packets have not been received, a flow controlmodule 200 sends a packet to the sender to cause the sender toretransmit the dropped data packets.

Repacketization

In yet another embodiment, the appliance 200 or flow controller 220applies a repacketization technique for improving the flow of transportlayer network traffic. In some embodiments, performance of TCP isproportional to packet size. Thus increasing packet sizes improvesperformance unless it causes substantially increased packet loss ratesor other nonlinear effects, like IP fragmentation. In general, wiredmedia (such as copper or fibre optics) have extremely low bit-errorrates, low enough that these can be ignored. For these media, it isadvantageous for the packet size to be the maximum possible beforefragmentation occurs (the maximum packet size is limited by theprotocols of the underlying transmission media). Whereas fortransmission media with higher loss rates (e.g., wireless technologiessuch as WiFi, etc., or high-loss environments such as power-linenetworking, etc.), increasing the packet size may lead to lowertransmission rates, as media-induced errors cause an entire packet to bedropped (i.e., media-induced errors beyond the capability of thestandard error correcting code for that media), increasing the packetloss rate. A sufficiently large increase in the packet loss rate willactually negate any performance benefit of increasing packet size. Insome cases, it may be difficult for a TCP endpoint to choose an optimalpacket size. For example, the optimal packet size may vary across thetransmission path, depending on the nature of each link.

By inserting an appliance 200 or flow control module 220 into thetransmission path, the flow controller 220 monitors characteristics ofthe link and repacketizes according to determined link characteristics.In one embodiment, an appliance 200 or flow controller 220 repacketizespackets with sequential data into a smaller number of larger packets. Inanother embodiment, an appliance 200 or flow controller 220 repacketizespackets by breaking part a sequence of large packets into a largernumber of smaller packets. In other embodiments, an appliance 200 orflow controller 220 monitors the link characteristics and adjusts thepacket sizes through recombination to improve throughput.

QoS

Still referring to FIG. 2A, the flow controller 220, in someembodiments, may include a QoS Engine 236, also referred to as a QoScontroller. In another embodiment, the appliance 200 and/or networkoptimization engine 250 includes the QoS engine 236, for example,separately but in communication with the flow controller 220. The QoSEngine 236 includes any logic, business rules, function or operationsfor performing one or more Quality of Service (QoS) techniques improvingthe performance, operation or quality of service of any of the networkconnections. In some embodiments, the QoS engine 236 includes networktraffic control and management mechanisms that provide differentpriorities to different users, applications, data flows or connections.In other embodiments, the QoS engine 236 controls, maintains, or assuresa certain level of performance to a user, application, data flow orconnection. In one embodiment, the QoS engine 236 controls, maintains orassures a certain portion of bandwidth or network capacity for a user,application, data flow or connection. In some embodiments, the QoSengine 236 monitors the achieved level of performance or the quality ofservice corresponding to a user, application, data flow or connection,for example, the data rate and delay. In response to monitoring, the QoSengine 236 dynamically controls or adjusts scheduling priorities ofnetwork packets to achieve the desired level of performance or qualityof service.

In some embodiments, the QoS engine 236 prioritizes, schedules andtransmits network packets according to one or more classes or levels ofservices. In some embodiments, the class or level service mayinclude: 1) best efforts, 2) controlled load, 3) guaranteed or 4)qualitative. For a best efforts class of service, the appliance 200makes reasonable effort to deliver packets (a standard service level).For a controlled load class of service, the appliance 200 or QoS engine236 approximates the standard packet error loss of the transmissionmedium or approximates the behavior of best-effort service in lightlyloaded network conditions. For a guaranteed class of service, theappliance 200 or QoS engine 236 guarantees the ability to transmit dataat a determined rate for the duration of the connection. For aqualitative class of service, the appliance 200 or QoS engine 236 thequalitative service class is used for applications, users, data flows orconnection that require or desire prioritized traffic but cannotquantify resource needs or level of service. In these cases, theappliance 200 or QoS engine 236 determines the class of service orprioritization based on any logic or configuration of the QoS engine 236or based on business rules or policies. For example, in one embodiment,the QoS engine 236 prioritizes, schedules and transmits network packetsaccording to one or more policies as specified by the policy engine 295,295′.

Protocol Acceleration

The protocol accelerator 234 includes any logic, business rules,function or operations for optimizing, accelerating, or otherwiseimproving the performance, operation or quality of service of one ormore protocols. In one embodiment, the protocol accelerator 234accelerates any application layer protocol or protocols at layers 5-7 ofthe network stack. In other embodiments, the protocol accelerator 234accelerates a transport layer or a layer 4 protocol. In one embodiment,the protocol accelerator 234 accelerates layer 2 or layer 3 protocols.In some embodiments, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate each of one or moreprotocols according to the type of data, characteristics and/or behaviorof the protocol. In another embodiment, the protocol accelerator 234 isconfigured, constructed or designed to improve a user experience,response times, network or computer load, and/or network or bandwidthutilization with respect to a protocol.

In one embodiment, the protocol accelerator 234 is configured,constructed or designed to minimize the effect of WAN latency on filesystem access. In some embodiments, the protocol accelerator 234optimizes or accelerates the use of the CIFS (Common Internet FileSystem) protocol to improve file system access times or access times todata and files. In some embodiments, the protocol accelerator 234optimizes or accelerates the use of the NFS (Network File System)protocol. In another embodiment, the protocol accelerator 234 optimizesor accelerates the use of the File Transfer protocol (FTP).

In one embodiment, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate a protocol carrying asa payload or using any type and form of markup language. In otherembodiments, the protocol accelerator 234 is configured, constructed ordesigned to optimize or accelerate a HyperText Transfer Protocol (HTTP).In another embodiment, the protocol accelerator 234 is configured,constructed or designed to optimize or accelerate a protocol carrying asa payload or otherwise using XML (eXtensible Markup Language).

Transparency and Multiple Deployment Configurations

In some embodiments, the appliance 200 and/or network optimizationengine 250 is transparent to any data flowing across a networkconnection or link, such as a WAN link. In one embodiment, the appliance200 and/or network optimization engine 250 operates in such a mannerthat the data flow across the WAN is recognizable by any networkmonitoring, QOS management or network analysis tools. In someembodiments, the appliance 200 and/or network optimization engine 250does not create any tunnels or streams for transmitting data that mayhide, obscure or otherwise make the network traffic not transparent. Inother embodiments, the appliance 200 operates transparently in that theappliance does not change any of the source and/or destination addressinformation or port information of a network packet, such as internetprotocol addresses or port numbers. In other embodiments, the appliance200 and/or network optimization engine 250 is considered to operate orbehave transparently to the network, an application, client, server orother appliances or computing device in the network infrastructure. Thatis, in some embodiments, the appliance is transparent in that networkrelated configuration of any device or appliance on the network does notneed to be modified to support the appliance 200.

The appliance 200 may be deployed in any of the following deploymentconfigurations: 1) in-line of traffic, 2) in proxy mode, or 3) in avirtual in-line mode. In some embodiments, the appliance 200 may bedeployed inline to one or more of the following: a router, a client, aserver or another network device or appliance. In other embodiments, theappliance 200 may be deployed in parallel to one or more of thefollowing: a router, a client, a server or another network device orappliance. In parallel deployments, a client, server, router or othernetwork appliance may be configured to forward, transfer or transmitnetworks to or via the appliance 200.

In the embodiment of in-line, the appliance 200 is deployed inline witha WAN link of a router. In this way, all traffic from the WAN passesthrough the appliance before arriving at a destination of a LAN.

In the embodiment of a proxy mode, the appliance 200 is deployed as aproxy device between a client and a server. In some embodiments, theappliance 200 allows clients to make indirect connections to a resourceon a network. For example, a client connects to a resource via theappliance 200, and the appliance provides the resource either byconnecting to the resource, a different resource, or by serving theresource from a cache. In some cases, the appliance may alter theclient's request or the server's response for various purposes, such asfor any of the optimization techniques discussed herein. In oneembodiment, the client 102 send requests addressed to the proxy. In onecase, the proxy responds to the client in place of or acting as a server106. In other embodiments, the appliance 200 behaves as a transparentproxy, by intercepting and forwarding requests and responsestransparently to a client and/or server. Without client-sideconfiguration, the appliance 200 may redirect client requests todifferent servers or networks. In some embodiments, the appliance 200may perform any type and form of network address translation, referredto as NAT, on any network traffic traversing the appliance.

In some embodiments, the appliance 200 is deployed in a virtual in-linemode configuration. In this embodiment, a router or a network devicewith routing or switching functionality is configured to forward,reroute or otherwise provide network packets destined to a network tothe appliance 200. The appliance 200 then performs any desiredprocessing on the network packets, such as any of the WAN optimizationtechniques discussed herein. Upon completion of processing, theappliance 200 forwards the processed network packet to the router totransmit to the destination on the network. In this way, the appliance200 can be coupled to the router in parallel but still operate as it ifthe appliance 200 were inline. This deployment mode also providestransparency in that the source and destination addresses and portinformation are preserved as the packet is processed and transmitted viathe appliance through the network.

End Node Deployment

Although the network optimization engine 250 is generally describedabove in conjunction with an appliance 200, the network optimizationengine 250, or any portion thereof, may be deployed, distributed orotherwise operated on any end node, such as a client 102 and/or server106. As such, a client or server may provide any of the systems andmethods of the network optimization engine 250 described herein inconjunction with one or more appliances 200 or without an appliance 200.

Referring now to FIG. 2B, an example embodiment of the networkoptimization engine 250 deployed on one or more end nodes is depicted.In brief overview, the client 102 may include a first networkoptimization engine 250′ and the server 106 may include a second networkoptimization engine 250″. The client 102 and server 106 may establish atransport layer connection and exchange communications with or withouttraversing an appliance 200.

In one embodiment, the network optimization engine 250′ of the client102 performs the techniques described herein to optimize, accelerate orotherwise improve the performance, operation or quality of service ofnetwork traffic communicated with the server 106. In another embodiment,the network optimization engine 250″ of the server 106 performs thetechniques described herein to optimize, accelerate or otherwise improvethe performance, operation or quality of service of network trafficcommunicated with the client 102. In some embodiments, the networkoptimization engine 250′ of the client 102 and the network optimizationengine 250″ of the server 106 perform the techniques described herein tooptimize, accelerate or otherwise improve the performance, operation orquality of service of network traffic communicated between the client102 and the server 106. In yet another embodiment, the networkoptimization engine 250′ of the client 102 performs the techniquesdescribed herein in conjunction with an appliance 200 to optimize,accelerate or otherwise improve the performance, operation or quality ofservice of network traffic communicated with the client 102. In stillanother embodiment, the network optimization engine 250″ of the server106 performs the techniques described herein in conjunction with anappliance 200 to optimize, accelerate or otherwise improve theperformance, operation or quality of service of network trafficcommunicated with the server 106.

C. Client Agent

As illustrated in FIGS. 2A and 2B, a client deployed in the system orwith an appliance 200 or 205 may include a client agent 120. In oneembodiment, the client agent 120 is used to facilitate communicationswith one or more appliances 200 or 205. In some embodiments, any of thesystems and methods of the appliance 200 or 205 described herein may bedeployed, implemented or embodied in a client, such as via a clientagent 120. In other embodiments, the client agent 120 may includeapplications, programs, or agents providing additional functionalitysuch as end point detection and authorization, virtual private networkconnectivity, and application streaming. Prior to discussing otherembodiments of systems and methods of the appliance 200, embodiments ofthe client agent 120 will be described.

Referring now to FIG. 3, an embodiment of a client agent 120 isdepicted. The client 102 has a client agent 120 for establishing,exchanging, managing or controlling communications with the appliance200, appliance 205 and/or server 106 via a network 104. In someembodiments, the client agent 120, which may also be referred to as aWAN client, accelerates WAN network communications and/or is used tocommunicate via appliance 200 on a network. In brief overview, theclient 102 operates on computing device 100 having an operating systemwith a kernel mode 302 and a user mode 303, and a network stack 267 withone or more layers 310 a-310 b. The client 102 may have installed and/orexecute one or more applications. In some embodiments, one or moreapplications may communicate via the network stack 267 to a network 104.One of the applications, such as a web browser, may also include a firstprogram 322. For example, the first program 322 may be used in someembodiments to install and/or execute the client agent 120, or anyportion thereof. The client agent 120 includes an interceptionmechanism, or interceptor 350, for intercepting network communicationsfrom the network stack 267 from the one or more applications.

As with the appliance 200, the client has a network stack 267 includingany type and form of software, hardware, or any combinations thereof,for providing connectivity to and communications with a network 104. Thenetwork stack 267 of the client 102 includes any of the network stackembodiments described above in conjunction with the appliance 200. Insome embodiments, the client agent 120, or any portion thereof, isdesigned and constructed to operate with or work in conjunction with thenetwork stack 267 installed or otherwise provided by the operatingsystem of the client 102.

In further details, the network stack 267 of the client 102 or appliance200 (or 205) may include any type and form of interfaces for receiving,obtaining, providing or otherwise accessing any information and datarelated to network communications of the client 102. In one embodiment,an interface to the network stack 267 includes an applicationprogramming interface (API). The interface may also have any functioncall, hooking or filtering mechanism, event or call back mechanism, orany type of interfacing technique. The network stack 267 via theinterface may receive or provide any type and form of data structure,such as an object, related to functionality or operation of the networkstack 267. For example, the data structure may include information anddata related to a network packet or one or more network packets. In someembodiments, the data structure includes, references or identifies aportion of the network packet processed at a protocol layer of thenetwork stack 267, such as a network packet of the transport layer. Insome embodiments, the data structure 325 is a kernel-level datastructure, while in other embodiments, the data structure 325 is auser-mode data structure. A kernel-level data structure may have a datastructure obtained or related to a portion of the network stack 267operating in kernel-mode 302, or a network driver or other softwarerunning in kernel-mode 302, or any data structure obtained or receivedby a service, process, task, thread or other executable instructionsrunning or operating in kernel-mode of the operating system.

Additionally, some portions of the network stack 267 may execute oroperate in kernel-mode 302, for example, the data link or network layer,while other portions execute or operate in user-mode 303, such as anapplication layer of the network stack 267. For example, a first portion310 a of the network stack may provide user-mode access to the networkstack 267 to an application while a second portion 310 a of the networkstack 267 provides access to a network. In some embodiments, a firstportion 310 a of the network stack has one or more upper layers of thenetwork stack 267, such as any of layers 5-7. In other embodiments, asecond portion 310 b of the network stack 267 includes one or more lowerlayers, such as any of layers 1-4. Each of the first portion 310 a andsecond portion 310 b of the network stack 267 may include any portion ofthe network stack 267, at any one or more network layers, in user-mode303, kernel-mode, 302, or combinations thereof, or at any portion of anetwork layer or interface point to a network layer or any portion of orinterface point to the user-mode 302 and kernel-mode 203.

The interceptor 350 may include software, hardware, or any combinationof software and hardware. In one embodiment, the interceptor 350intercepts or otherwise receives a network communication at any point inthe network stack 267, and redirects or transmits the networkcommunication to a destination desired, managed or controlled by theinterceptor 350 or client agent 120. For example, the interceptor 350may intercept a network communication of a network stack 267 of a firstnetwork and transmit the network communication to the appliance 200 fortransmission on a second network 104. In some embodiments, theinterceptor 350 includes or is a driver, such as a network driverconstructed and designed to interface and work with the network stack267. In some embodiments, the client agent 120 and/or interceptor 350operates at one or more layers of the network stack 267, such as at thetransport layer. In one embodiment, the interceptor 350 includes afilter driver, hooking mechanism, or any form and type of suitablenetwork driver interface that interfaces to the transport layer of thenetwork stack, such as via the transport driver interface (TDI). In someembodiments, the interceptor 350 interfaces to a first protocol layer,such as the transport layer and another protocol layer, such as anylayer above the transport protocol layer, for example, an applicationprotocol layer. In one embodiment, the interceptor 350 includes a drivercomplying with the Network Driver Interface Specification (NDIS), or aNDIS driver. In another embodiment, the interceptor 350 may be amin-filter or a mini-port driver. In one embodiment, the interceptor350, or portion thereof, operates in kernel-mode 202. In anotherembodiment, the interceptor 350, or portion thereof, operates inuser-mode 203. In some embodiments, a portion of the interceptor 350operates in kernel-mode 202 while another portion of the interceptor 350operates in user-mode 203. In other embodiments, the client agent 120operates in user-mode 203 but interfaces via the interceptor 350 to akernel-mode driver, process, service, task or portion of the operatingsystem, such as to obtain a kernel-level data structure 225. In furtherembodiments, the interceptor 350 is a user-mode application or program,such as application.

In one embodiment, the interceptor 350 intercepts or receives anytransport layer connection requests. In these embodiments, theinterceptor 350 executes transport layer application programminginterface (API) calls to set the destination information, such asdestination IP address and/or port to a desired location for thelocation. In this manner, the interceptor 350 intercepts and redirectsthe transport layer connection to an IP address and port controlled ormanaged by the interceptor 350 or client agent 120. In one embodiment,the interceptor 350 sets the destination information for the connectionto a local IP address and port of the client 102 on which the clientagent 120 is listening. For example, the client agent 120 may comprise aproxy service listening on a local IP address and port for redirectedtransport layer communications. In some embodiments, the client agent120 then communicates the redirected transport layer communication tothe appliance 200.

In some embodiments, the interceptor 350 intercepts a Domain NameService (DNS) request. In one embodiment, the client agent 120 and/orinterceptor 350 resolves the DNS request. In another embodiment, theinterceptor transmits the intercepted DNS request to the appliance 200for DNS resolution. In one embodiment, the appliance 200 resolves theDNS request and communicates the DNS response to the client agent 120.In some embodiments, the appliance 200 resolves the DNS request viaanother appliance 200′ or a DNS server 106.

In yet another embodiment, the client agent 120 may include two agents120 and 120′. In one embodiment, a first agent 120 may include aninterceptor 350 operating at the network layer of the network stack 267.In some embodiments, the first agent 120 intercepts network layerrequests such as Internet Control Message Protocol (ICMP) requests(e.g., ping and traceroute). In other embodiments, the second agent 120′may operate at the transport layer and intercept transport layercommunications. In some embodiments, the first agent 120 interceptscommunications at one layer of the network stack 210 and interfaces withor communicates the intercepted communication to the second agent 120′.

The client agent 120 and/or interceptor 350 may operate at or interfacewith a protocol layer in a manner transparent to any other protocollayer of the network stack 267. For example, in one embodiment, theinterceptor 350 operates or interfaces with the transport layer of thenetwork stack 267 transparently to any protocol layer below thetransport layer, such as the network layer, and any protocol layer abovethe transport layer, such as the session, presentation or applicationlayer protocols. This allows the other protocol layers of the networkstack 267 to operate as desired and without modification for using theinterceptor 350. As such, the client agent 120 and/or interceptor 350interfaces with or operates at the level of the transport layer tosecure, optimize, accelerate, route or load-balance any communicationsprovided via any protocol carried by the transport layer, such as anyapplication layer protocol over TCP/IP.

Furthermore, the client agent 120 and/or interceptor 350 may operate ator interface with the network stack 267 in a manner transparent to anyapplication, a user of the client 102, the client 102 and/or any othercomputing device 100, such as a server or appliance 200, 206, incommunications with the client 102. The client agent 120, or any portionthereof, may be installed and/or executed on the client 102 in a mannerwithout modification of an application. In one embodiment, the clientagent 120, or any portion thereof, is installed and/or executed in amanner transparent to any network configuration of the client 102,appliance 200, 205 or server 106. In some embodiments, the client agent120, or any portion thereof, is installed and/or executed withmodification to any network configuration of the client 102, appliance200, 205 or server 106. In one embodiment, the user of the client 102 ora computing device in communications with the client 102 are not awareof the existence, execution or operation of the client agent 12, or anyportion thereof. As such, in some embodiments, the client agent 120and/or interceptor 350 is installed, executed, and/or operatedtransparently to an application, user of the client 102, the client 102,another computing device, such as a server or appliance 200, 2005, orany of the protocol layers above and/or below the protocol layerinterfaced to by the interceptor 350.

The client agent 120 includes a streaming client 306, a collection agent304, SSL VPN agent 308, a network optimization engine 250, and/oracceleration program 302. In one embodiment, the client agent 120 is anIndependent Computing Architecture (ICA) client, or any portion thereof,developed by Citrix Systems, Inc. of Fort Lauderdale, Fla., and is alsoreferred to as an ICA client. In some embodiments, the client agent 120has an application streaming client 306 for streaming an applicationfrom a server 106 to a client 102. In another embodiment, the clientagent 120 includes a collection agent 304 for performing end-pointdetection/scanning and collecting end-point information for theappliance 200 and/or server 106. In some embodiments, the client agent120 has one or more network accelerating or optimizing programs oragents, such as a network optimization engine 250 and an accelerationprogram 302. In one embodiment, the acceleration program 302 acceleratescommunications between client 102 and server 106 via appliance 205′. Insome embodiments, the network optimization engine 250 provides WANoptimization techniques as discussed herein.

The streaming client 306 is an application, program, process, service,task or set of executable instructions for receiving and executing astreamed application from a server 106. A server 106 may stream one ormore application data files to the streaming client 306 for playing,executing or otherwise causing to be executed the application on theclient 102. In some embodiments, the server 106 transmits a set ofcompressed or packaged application data files to the streaming client306. In some embodiments, the plurality of application files arecompressed and stored on a file server within an archive file such as aCAB, ZIP, SIT, TAR, JAR or other archive. In one embodiment, the server106 decompresses, unpackages or unarchives the application files andtransmits the files to the client 102. In another embodiment, the client102 decompresses, unpackages or unarchives the application files. Thestreaming client 306 dynamically installs the application, or portionthereof, and executes the application. In one embodiment, the streamingclient 306 may be an executable program. In some embodiments, thestreaming client 306 may be able to launch another executable program.

The collection agent 304 is an application, program, process, service,task or set of executable instructions for identifying, obtaining and/orcollecting information about the client 102. In some embodiments, theappliance 200 transmits the collection agent 304 to the client 102 orclient agent 120. The collection agent 304 may be configured accordingto one or more policies of the policy engine 236 of the appliance. Inother embodiments, the collection agent 304 transmits collectedinformation on the client 102 to the appliance 200. In one embodiment,the policy engine 236 of the appliance 200 uses the collectedinformation to determine and provide access, authentication andauthorization control of the client's connection to a network 104.

In one embodiment, the collection agent 304 is an end-point detectionand scanning program, which identifies and determines one or moreattributes or characteristics of the client. For example, the collectionagent 304 may identify and determine any one or more of the followingclient-side attributes: 1) the operating system an/or a version of anoperating system, 2) a service pack of the operating system, 3) arunning service, 4) a running process, and 5) a file. The collectionagent 304 may also identify and determine the presence or version of anyone or more of the following on the client: 1) antivirus software, 2)personal firewall software, 3) anti-spam software, and 4) internetsecurity software. The policy engine 236 may have one or more policiesbased on any one or more of the attributes or characteristics of theclient or client-side attributes.

The SSL VPN agent 308 is an application, program, process, service, taskor set of executable instructions for establishing a Secure Socket Layer(SSL) virtual private network (VPN) connection from a first network 104to a second network 104′, 104″, or a SSL VPN connection from a client102 to a server 106. In one embodiment, the SSL VPN agent 308establishes a SSL VPN connection from a public network 104 to a privatenetwork 104′ or 104″. In some embodiments, the SSL VPN agent 308 worksin conjunction with appliance 205 to provide the SSL VPN connection. Inone embodiment, the SSL VPN agent 308 establishes a first transportlayer connection with appliance 205. In some embodiment, the appliance205 establishes a second transport layer connection with a server 106.In another embodiment, the SSL VPN agent 308 establishes a firsttransport layer connection with an application on the client, and asecond transport layer connection with the appliance 205. In otherembodiments, the SSL VPN agent 308 works in conjunction with WANoptimization appliance 200 to provide SSL VPN connectivity.

In some embodiments, the acceleration program 302 is a client-sideacceleration program for performing one or more acceleration techniquesto accelerate, enhance or otherwise improve a client's communicationswith and/or access to a server 106, such as accessing an applicationprovided by a server 106. The logic, functions, and/or operations of theexecutable instructions of the acceleration program 302 may perform oneor more of the following acceleration techniques: 1) multi-protocolcompression, 2) transport control protocol pooling, 3) transport controlprotocol multiplexing, 4) transport control protocol buffering, and 5)caching via a cache manager. Additionally, the acceleration program 302may perform encryption and/or decryption of any communications receivedand/or transmitted by the client 102. In some embodiments, theacceleration program 302 performs one or more of the accelerationtechniques in an integrated manner or fashion. Additionally, theacceleration program 302 can perform compression on any of theprotocols, or multiple-protocols, carried as a payload of a networkpacket of the transport layer protocol.

In one embodiment, the acceleration program 302 is designed, constructedor configured to work with appliance 205 to provide LAN sideacceleration or to provide acceleration techniques provided viaappliance 205. For example, in one embodiment of a NetScaler appliance205 manufactured by Citrix Systems, Inc., the acceleration program 302includes a NetScaler client. In some embodiments, the accelerationprogram 302 provides NetScaler acceleration techniques stand-alone in aremote device, such as in a branch office. In other embodiments, theacceleration program 302 works in conjunction with one or more NetScalerappliances 205. In one embodiment, the acceleration program 302 providesLAN-side or LAN based acceleration or optimization of network traffic.

In some embodiments, the network optimization engine 250 may bedesigned, constructed or configured to work with WAN optimizationappliance 200. In other embodiments, network optimization engine 250 maybe designed, constructed or configured to provide the WAN optimizationtechniques of appliance 200, with or without an appliance 200. Forexample, in one embodiment of a WANScaler appliance 200 manufactured byCitrix Systems, Inc. the network optimization engine 250 includes theWANScaler client. In some embodiments, the network optimization engine250 provides WANScaler acceleration techniques stand-alone in a remotelocation, such as a branch office. In other embodiments, the networkoptimization engine 250 works in conjunction with one or more WANScalerappliances 200.

In another embodiment, the network optimization engine 250 includes theacceleration program 302, or the function, operations and logic of theacceleration program 302. In some embodiments, the acceleration program302 includes the network optimization engine 250 or the function,operations and logic of the network optimization engine 250. In yetanother embodiment, the network optimization engine 250 is provided orinstalled as a separate program or set of executable instructions fromthe acceleration program 302. In other embodiments, the networkoptimization engine 250 and acceleration program 302 are included in thesame program or same set of executable instructions.

In some embodiments and still referring to FIG. 3, a first program 322may be used to install and/or execute the client agent 120, or anyportion thereof, automatically, silently, transparently, or otherwise.In one embodiment, the first program 322 is a plugin component, such anActiveX control or Java control or script that is loaded into andexecuted by an application. For example, the first program comprises anActiveX control loaded and run by a web browser application, such as inthe memory space or context of the application. In another embodiment,the first program 322 comprises a set of executable instructions loadedinto and run by the application, such as a browser. In one embodiment,the first program 322 is designed and constructed to install the clientagent 120. In some embodiments, the first program 322 obtains,downloads, or receives the client agent 120 via the network from anothercomputing device. In another embodiment, the first program 322 is aninstaller program or a plug and play manager for installing programs,such as network drivers and the client agent 120, or any portionthereof, on the operating system of the client 102.

In some embodiments, each or any of the portions of the client agent120—a streaming client 306, a collection agent 304, SSL VPN agent 308, anetwork optimization engine 250, acceleration program 302, andinterceptor 350—may be installed, executed, configured or operated as aseparate application, program, process, service, task or set ofexecutable instructions. In other embodiments, each or any of theportions of the client agent 120 may be installed, executed, configuredor operated together as a single client agent 120.

D. Systems and Methods for Using Transaction Boundaries to PrioritizeTraffic

Now referring to FIG. 4, a sample TCP packet is shown. In briefoverview, a TCP packet comprises a header 410 and payload 490. Theheader 410 comprises a number of indications which may be used toindicate transmission events related to data communications and networkcongestion, including an ACK number 460, Explicit CongestionNotification Echo (ECE flag), ACK flag 440, and Push (PSH) flag 420.

Still referring to FIG. 4, the sample TCP packet is shown to graphicallyillustrate some of the information that may be included in a TCP packet.Although the sample shown reflects a particular embodiment of a TCPpacket, persons of ordinary skill in the art will recognize that manyimplementations and variations of TCP and other network protocols may beapplicable to the systems and methods described herein, including theTCP implementations specified in RFC 793, RFC 1122, and specifically RFC2581 and RFC 3168 relating to congestion control and avoidance. In someof these implementations and others, an ECE flag may be utilized tonotify the packet recipient that network congestion is occurring. Thepacket recipient may then elect to slow down their rate of transmissionor adopt any other congestion control or avoidance tactics. This ECEflag may also be used in combination with other signaling bits whichnegotiate with a recipient whether Explicit Congestion Notification(ECN) is supported. Any bits in any protocol used in the negotiation orsignaling of explicit congestion may be referred to as ECN bits.

Referring now to FIG. 5, an illustration of a number of clientstransmitting packet groups which may be classified as transactions isshown. In brief overview, each client 102 is transmitting a number ofpackets via a connection 520. The packets may comprise any type ofpacket and may comprise any protocol or protocols. In one example, thepackets may comprise network-layer packets, such as IP packets. Inanother example, the packets may comprise transport layer packets, suchas TCP or UDP packets. The connections may comprise any type ofconnection and may be transmitted via any network. The packets may bedivided into groups corresponding to transactions, as previouslydiscussed herein, using any method.

Still referring to FIG. 5, now in greater detail, in many cases it maybe useful to identify groups of packets comprising transactions. Broadlyspeaking, a transaction comprises a set of packets for which receipt ofthe entire set of packets is required before a subsequent transmissioncan begin. In some cases, a transaction may comprise a set of packetswhich must be successfully received before the recipient can beginsending a response. An example of this case may be an HTTP request wherea server must receive the entire HTTP request before the server canbegin transmitting the HTTP response. In other cases, a transaction maycomprise a set of packets which must be successfully received before thesender of the packets can send a subsequent transmission. In some cases,a transaction-heavy communication stream may exhibit “ping pong”behavior, in that each side must wait for a response from the other sidebefore beginning a next transmission.

A device may detect a transaction and/or transaction boundary using anytechnique. In some embodiments, the device may have specific knowledgeof one or more application protocols which allow a device to detecttransaction boundaries. In other embodiments, the device may detect atransaction boundary without specific knowledge of the applicationgenerating the transactions.

In one embodiment, a device may use time-based methods for detecting atransaction boundary. If the sender has been sending data and ceasesthen, after a period of time of inactivity, the device may decide that atransaction boundary has been indicated. A device may require any timeinterval to pass before declaring a transaction boundary. In someembodiments, the time interval may be an absolute time interval,including without limitation 1 ms, 2 ms, 5 ms, 10 ms, 20 ms, 30 ms, 50ms, 100 ms, 200 ms, 500 ms and 1 second. In other embodiments, the timeinterval may be a time interval relative to previous packet delays. Forexample, if a connection has an average packet spacing of 5 ms, aspacing of greater than 10 ms may indicate a transaction boundary. Forexample, in connection 520 a, the long delay between the group ofpackets 500 b and 500 a may indicate a transaction boundary. Thistime-based method may be used to identify transaction boundaries inconnections using an unknown or encrypted protocol.

In other embodiments, a device may use explicit signals contained in thepackets to determine transaction boundaries. For example, the setting ofthe PSH (TCP Push) bit by the sender in a TCP header of a packet mayindicate a transaction boundary. Or for example, opening and closing ofa TCP connection may also mark transaction boundaries. In some cases, adevice may combine the time-based approach with these additionalheuristics for detection of a transaction boundary. In anothertechnique, if the device 220 understands the application protocol, itcan parse the protocol data stream and directly determine transactionboundaries. In some embodiments, this last behavior can be usedindependent of any time-based mechanism. For example, a device mayidentify that a given packet is the last packet (or only packet) of aremote procedure call. Or a device may identify that a packet is thelast packet of an HTTP request.

In still other embodiments, a device may detect a transaction boundaryby comparing a packet to a maximum packet size for the connection. If apacket size is below the maximum packet size for the connection, it mayindicate that the sender is not transmitting a full size packet becausethe sender cannot send any more data until that smaller packet isreceived and/or responded to. A device may determine the maximum packetsize for a connection via any means, including prior configuration andanalysis of one or more previous packets sent via the connection. Forexample, in connection 520 b, a device may detect a transaction 500 cafter receiving a number of full size packets followed by a shorterpacket. In still other embodiments, a device may detect a case where apacket is smaller than a preceding packet and mark those cases asindicating transaction boundaries. In some embodiments, these methodsmay allow detection of transaction boundaries before a device candetermine whether the shorter packet is followed by a delay intransmission. These methods may also be used to identify transactionboundaries in connections using an unknown or encrypted protocol. Inother embodiments, these techniques may be combined with one or more ofthe other techniques for determining transaction boundaries.

In another embodiment, a device may detect a transaction boundary bydetecting whether one or more buffers corresponding to the connectionhave transitioned from full to empty. For example, a device may have anumber of input buffers corresponding to data received via a number ofconnections. If one of the input buffers becomes empty, the device maydetermine that the last packet received via the connection is the lastpacket of a transaction. In some cases, monitoring buffer states mayserve as a method of detecting gaps in packet arrival times, and thusprovide similar functionality to the time-based method of transactionboundary detection. Buffer transitions from empty to full can also beused to demarcate the beginnings of transactions.

Now referring to FIG. 5B, a block diagram of a system for prioritizing,based on transaction size, packets awaiting transmission from anintermediary device is shown. In brief overview, an appliance 200receives packet streams from a number of clients 102 via a number ofconnections 515. A flow controller 220 and QoS engine 236 sort thereceived packets into a number of transmission queues of high or lowpriority where they await transmission out via network 104. Theappliance may prioritize packets corresponding to smaller transactionsizes higher than packets corresponding to larger transaction sizes.This system will be described in greater detail with respect to FIG. 6,which depicts a method that may be used by the system shown.

Now referring to FIG. 6, a method for prioritizing, based on transactionsize, packets awaiting transmission from an intermediary device isshown. In brief overview, the method comprises receiving, by anintermediary, a first packet (step 601); and receiving, by theintermediary, a second packet (step 603). The intermediary may thendetermine a first transaction size of a transaction (step 605); andassigning, a first transmission priority to the first packet, thetransmission priority determined responsive to the determined firsttransaction size (step 607). The intermediary may then transmit thefirst packet and the second packet, wherein the transmission order isdetermined according to the first assigned transmission priority (step609).

Still referring to FIG. 6, now in greater detail, an intermediary mayreceive a first packet in any manner (step 601). In some embodiments,the intermediary may comprise one of a client 102, client agent 120,server 106, server agent, or network appliance. In one embodiment, anintermediary for a plurality of transport layer connections may receivea first packet via a first transport layer connection of the pluralityof transport layer connections. In some cases, the plurality oftransport layer connections may all comprise the same transport layerprotocol. In other cases, the plurality of transport layer connectionsmay comprise a plurality of transport layer protocols. For example, theintermediary may be a client agent serving as an intermediary for anumber of TCP connections from a client to a server. Or, for example,the intermediary may be a network appliance serving as a transparentproxy for a number of TCP connections from a number of clients to anumber of servers. The received first packet may comprise any transportlayer protocol including, without limitation, TCP and UDP.

The intermediary may receive a second packet in any manner (step 603).In some embodiments, the intermediary may receive the second packet viaa second transport layer connection of a plurality of transport layerconnections. The second packet may be received before, after, orsimultaneously with the first packet. In some embodiments, the secondpacket may share a source and/or destination with the first packet. Inother embodiments, the second packet may comprise a different source anddestination.

The intermediary may determine a first transaction size of a transactionin any manner (step 605). In some embodiments, the first transactionsize may be the transaction size of a transaction comprising the firstpacket. In other embodiments, the first transaction size may be atransaction size of another transaction related to the first packet,such as a transaction immediately preceding the first packet via thesame connection as the first packet. In some embodiments, theintermediary may use one or more of any of the transaction andtransaction boundary detection techniques described herein including,without limitation, time-based methods, PSH bit detection, packet sizeanalysis, and buffer monitoring. A transaction size may be measured byany metric, including, without limitation, the total number of bytescomprising the transaction, the total number of packets comprising thetransaction, or the elapsed time from the beginning to the end of thetransaction. In one embodiment, an intermediary may determine atransaction size by storing, with respect to a given connection, a valuewhich is set to zero at the start of each transaction. As more packetsare received via the connection, the value may then be incremented withthe number of bytes sent via the connection until a transaction boundaryending is detected. In another embodiment, an intermediary may determinea transaction size by storing, with respect to a given connection, atimestamp of a transaction start. After detecting a transaction endingboundary, the intermediary may compute the elapsed time between theending boundary and the timestamp. In some embodiments, the intermediarymay cap transaction sizes at a given amount. For example, anintermediary may treat all transactions of longer than 10 KB as if theywere 10 KB transactions. Or for example, an intermediary may treat alltransactions of longer than 1 second as 1 second transactions.

In some embodiments, the intermediary may determine an averagetransaction size for the first transport layer connection. This averagemay comprise any type of average, including, without limitation, a mean,median, or mode. An average transaction size may be computed in anymanner. In some embodiments, an intermediary may maintain a rollingaverage of transaction sizes for a given connections. In otherembodiments, an intermediary may compute an average transaction size fora connection by computing an average transaction size for a sample setof the data sent via the connection. For example, an intermediary maycompute an average transaction size for transactions sent during thefirst minute of a connection. This average may be periodically updatedwith later samples as well. In another embodiment, an intermediary maytrack the total number of bytes sent via a connection and divide thistotal by the total number of detected transactions to determine anaverage transaction size.

In one embodiment, the intermediary may also determine a secondtransaction size of a transaction comprising the second packet in anymanner. This transaction size may be determined using any of the abovetechniques. In one embodiment, the intermediary may determine an averagetransaction size with respect to the second connection. In someembodiments, the same method may be used to determine the first andsecond transaction sizes.

The intermediary may assign, to the first packet, a transmissionpriority based on the determined first transaction size in any manner(step 607). In one embodiment, higher transmission priorities may beassigned to packets corresponding to smaller transaction sizes. Thisembodiment may be used to provide QoS to one or more bursty connections,such as VoIP or videoconferencing traffic. In one example, anintermediary may assign high priority to transactions less than 256bytes long, normal priority to transactions between 257 and 1280 byteslong, and high priority to transactions above 1280 bytes. In someembodiments, the transmission priority may be responsive to both atransaction size and a pre-existing priority. For example, anintermediary may compute a packet priority by incrementing a connectionpriority in response to the determined transaction size. In otherembodiments, the transmission priority may be responsive to both adetermined transaction size and a predetermined bandwidth threshold. Forexample, an intermediary may prioritize high priority to smallertransactions unless or until the connection sending the smalltransaction has exceeded a given bandwidth limit. The intermediary maythen reduce the priority of subsequent small transaction sent via theconnection until the bandwidth used by the connection drops below anacceptable threshold.

In some embodiments, the intermediary may assign a priority to thesecond packet in a similar manner to the assigning of priority to thefirst packet. In other embodiments, no priority may be assigned to thesecond packet.

The intermediary may then transmit the first and second packet in anymanner, wherein the transmission order is determined according to anassigned transmission priority (step 609). In one embodiment, theintermediary may place the first and second packet into prioritizedtransmission queues as depicted in FIG. 5B. For example, the packetssent via connections 515 a and 515 b are placed in a high priority queueas they correspond to smaller transaction sizes. The packetscorresponding to connection 515 n are placed in a low priority queue asthey correspond to a single, longer transaction. To give anotherexample, in a situation in which three connections, A, B, and C havetransactions queued for sending, and the transactions are 3, 2, and 1packets long, respectively. The packets may then be sent in the order CB B A A A. This may be contrasted with a round-robin approach, whichmight send A B C A B A. In this example, a potential benefit oftransaction-based prioritization can clearly be seen. Transactions C andB each finish two packets sooner than they would have under the roundrobin approach, while transaction A is unaffected.

In another embodiment, the first and second packets may be placed in asingle queue, and the order within the queue may be determined by therelative priority of the packets. In some embodiments, a transmissionqueue may be reordered in response to receiving a subsequenttransaction. In these embodiments, an intermediary may insert a newlyreceived transaction ahead of larger transactions waiting to betransmitted. For example, if a transmission queue currently comprises DE E E F F F F, where D, E, and F are packets from transactions of 1, 3,and 4 bytes, respectively, and a transaction G G is received, the queuemay be modified to D G G E E F F F F. In some embodiments, a singlequeue may be combined with one or more timers so that packetscorresponding to longer transmissions are not held up by shortertransactions indefinitely. In still other embodiments, an intermediarymay maintain multiple queues according to given priorities, and orderpackets within each queue according to relative priorities within thequeue. For example, an intermediary may maintain a high priority queuefor transactions of less than 200 bytes, and a normal priority queue forall other transactions. Within each queue, the transaction may then beordered according to their respective sizes.

In some embodiments, any of the above methods may be used to provideQoS. For example, the above methods may be used to prioritize real-timetraffic, which may be characterized by short bursty transactions, overfile downloading, which may be characterized by long, continuoustransactions. In another example, the above methods may be used toprioritize remote procedure calls and other interactive applicationsover non-interactive traffic.

E. Systems and Methods for Reducing Timeout Penalties

Referring now to FIGS. 7A and 7B, systems and methods for usingtransaction boundaries to reduce timeout penalties are shown. In briefoverview, after detecting a transaction boundary, a device may generateand transmit an additional packet following the transmission of thetransaction. The additional packet may be configured to generate an ACKfrom the receiver which will indicate whether the last packet of thetransaction was successfully received. Many protocols, such as TCP, mayuse a retransmission timeout (RTO) to discover and correct cases wherethe last packet of a transaction has been dropped. However, RTOs mayprovide only coarse control over delays induced by packet losses. Insome protocols, RTOs can be very expensive, such as TCP, where the RTOis by default a full second. The systems and methods of FIGS. 7A and 7Bmay be used to attempt to avoid such RTO delays by early discovery ofdropped last packets.

Referring now to FIG. 7B, a method for reducing transmission timeouts byselectively transmitting additional packets from an intermediary devicebased on identifying transaction boundaries is shown. In brief overview,the method comprises receiving, by a first device, a first packet from asender (step 701). The first device transmits the first packet to areceiver (step 703), and determines that the first packet is likely tobe the last packet of a transaction (step 705). The first device thengenerates, responsive to the determination, at least one additionalpacket (step 707); and transmits the additional packet to the receiverafter the first packet has been transmitted (step 709). The first devicemay then receive an acknowledgement corresponding to the additionalpacket (step 711), determine that a previously transmitted data packethas not been received (step 709), and retransmit the data packets notreceived (step 711).

Still referring to FIG. 7B, now in greater detail, a device may receivea first packet from a sender via any means (step 701). The device maycomprise any computing device, including a client, server, client agent,server agent, or appliance. The sender may also comprise any computingdevice. In some cases the sender may be a client and the device may be aclient agent executing on the client. The first packet may be receivedby any connection, including without limitation a transport layerconnection such as a TCP or UDP connection. In some embodiments, thedevice may be serving as a transparent proxy for the connection. Inother embodiments, the device may be performing one or more accelerationfunctions for the connection.

The first device may then transmit the first packet to a receiver viaany means (step 703). In some embodiments, the first device may transmitthe first packet via a transport layer connection such as a TCP or UDPconnection. The receiver may also comprise any computing device. In someembodiments, either the sender or the receiver may be connected to thedevice by a WAN. In some embodiments, the appliance may determine to usethe method shown based on a determination that one of the sender orreceiver is connected to the device via a WAN.

The first device may determine that the first packet is likely to be thelast packet of a transaction via any means (step 705). The first devicemay use any one or more of the transaction boundary techniques describedherein. In some embodiments, the first device may determine that thefirst packet is smaller than a previously transmitted packet or amaximum packet size. In other embodiments, the first device may detectthat a buffer corresponding to the connection has transitioned fromnon-empty to empty.

The first device may then send, in response to the determination, atleast one additional packet (step 707). The additional packet maycomprise any type of packet and may comprise any payload. In someembodiments, the additional packet may comprise a duplicate of the firstpacket. In other embodiments, the additional packet may comprise aduplicate of a portion of the first packet. In still other embodiments,the additional packet may be generated according to any forwarderror-correction techniques. In some cases, the device may send multipleadditional packets. For example, if the connection has a high loss rate,the device may send a plurality of duplicate packets.

In some embodiments, the device may include any additional factors inthe decision to transmit one or more additional factors. These factorsmay include, without limitation the connection loss rate, latency,available bandwidth, current load on the device, and a priority or QoSlevel assigned to the connection.

The first device may transmit, after the first packet has beentransmitted to the receiver, the at least one additional packet to thereceiver via the connection in any manner (step 709). The device maywait any time interval after the transmission of the first packet beforesending the additional packet. In one embodiment, the device maytransmit the additional packet immediately following the first packet.In another embodiment, the device may wait a period of time such thatthe first packet and the additional packet are unlikely to both be lostin a single loss event.

The additional packet may be configured in any way to generate anacknowledgement from the receiver. In some embodiments, the additionalpacket may comprise a TCP packet intended to provoke a TCPacknowledgement.

The first device may then receive an acknowledgement corresponding tothe additional packet (step 711) and determine that one or morepreviously transmitted data packets have not been received (step 713).The received acknowledgement may comprise any type of acknowledgementand may contain any indication that a data packet has not been received.In some embodiments, the received acknowledgement may comprise aduplicate TCP acknowledgement. In some cases, the receivedacknowledgement may indicate that the first data packet was notreceived. In other cases, the received acknowledgement may indicate thatone or more other data packets was not received.

The first device may then retransmit the packet or packets that were notreceived (step 715). In some embodiments, the first device may alsotransmit one or more additional packets after the retransmissions. Inother embodiments, the first device may transmit an indication to thesender indicating the dropped packets so that the sender can retransmitthe dropped packets.

Referring now to FIGS. 8A and 8B, systems and methods for retransmittingnetwork packets between a sender and a receiver to reduce retransmissioncosts associated with a connection are depicted. In many protocols,including, for example, TCP, use retransmissions as one means forproviding a reliable data stream. In addition to standard retransmissiondelays, extra delays may be incurred when a retransmitted packet is alsodropped. In some cases, the dropping of a retransmitted packet may causea delay equal to a full RTT. The systems and methods shown may be usedto reduce the likelihood of these additional performance penalties. Inbrief overview, a device, which may be an appliance 200, receives andforwards a packet. Upon receiving an indication that the packet was notreceived, the appliance retransmits the packet and also determineswhether the loss rate of the connection exceeds a given threshold. Ifthe loss rate does exceed the threshold, the appliance may thenre-retransmit the dropped packet. This re-retransmission may beperformed prior to receiving any indication that the retransmittedpacket was lost.

Referring now to FIG. 8B, a method for retransmitting network packetsbetween a sender and a receiver to reduce retransmission costsassociated with a connection is shown. In brief overview, the methodcomprises receiving, by a device, an indication that a network packettransmitted via a connection was not received by the receiver (step801); and retransmitting, by the device, the network packet to thereceiver in response to the indication (step 803). The device maydetermine a packet loss rate associated with the connection (step 805).The device may then determine, in response to the determined packet lossrate, a number of additional retransmissions (step 807); and retransmitthe network packet in accordance with the determined number ofadditional retransmissions (step 809).

Still referring to FIG. 8B, a device may receive an indication that apacket transmitted via the transport layer connection was not receivedby the receiver (step 801). The device may comprise any computingdevice, including a client, server, client agent, server agent, orappliance. The receiver may also comprise any computing device. In oneembodiment, the connection may comprise a transport layer connection. Insome embodiments, the connection may comprise a TCP connection and thepacket may comprise a TCP packet. In these embodiments, the indicationmay comprise one or more duplicate acknowledgements indicating that thepacket was not received. In other embodiments, the device may receiveany other type of indication.

The device may then retransmit the network packet to the receiver in anymanner (step 803). The device may retransmit the network packet via anyprotocol or protocols. In some embodiments, the device may also send anindication to the sender of the packet indicating the packet loss event.

The device may determine a packet loss rate associated with theconnection in any manner (step 805). A packet loss rate may reflect anypacket loss events, including packets dropped, lost, corrupted, orotherwise unsuccessfully received. In some embodiments, the packet lossrate may be computed based on statistics relating to the individualconnection. In these embodiments, the device may compute a loss ratebased on a total of packets sent via the connection divided by the totalnumber of packet losses. Alternatively, the device may compute a packetloss rate by computing a packet loss rate for a subset or a number ofsubsets of packets transmitted via the connection. In other embodiments,the packet loss rate may be computed with respect to a number ofconnections traveling over a similar network. For example, an applianceconnected to a WAN may compute an average packet loss rate for alltraffic over the WAN. Or an appliance connected to a wireless networkmay compute an average loss rate for all traffic traversing the wirelessnetwork. In still other embodiments, the packet loss rate may bemanually configured.

The device may determine, in response to the determined loss rate, anumber of additional retransmissions. Additional retransmissionsindicate the number of extra times the packet will be retransmittedbefore receiving an indication that the first retransmitted packet wasnot received. In some embodiments, if the loss rate is above a giventhreshold, the device may determine an additional retransmission isnecessary. For example, if the packet loss rate is above 5%, the devicemay determine to use 1 additional retransmission. Or, for example, ifthe packet loss rate is above 10%, the device may determine to use 2additional retransmissions. The device may determine and use any numberof additional retransmissions, including 0, 1, 2, 3, 4, and 5. The lossrate threshold may comprise any number or percentage of packets lost,including without limitation 1%, 2%, 3%, 5%, 8%, 10% and 20%.

In some embodiments, the device may determine the number of additionalretransmissions in response to one or more factors in addition to theloss rate. These additional factors may include, without limitationconnection bandwidth, connection latency, a transaction size associatedwith the connection, a protocol associated with the connection, and/or apriority or QoS associated with the connection. For example, the devicemay determine that for low priority connections, no additionalretransmissions will be done regardless of loss rate. Or, for example,the device may determine that for normal priority connections theconnection loss rate must exceed 8% for an additional retransmission tobe used, while for high priority connections the loss rate must onlyexceed 2% before an additional retransmission is used. In anotherexample, protocols with low latency tolerances may be accorded highernumbers of additional retransmissions. In this example, protocolsassociated with VoIP or other real-time applications may be prioritizedso that the extra delays associated with traditional methods ofretransmitting may be avoided. In still another example, the device maydetermine a transaction size associated with the dropped packet, andcompute the number of retransmissions accordingly. In this example,smaller transaction sizes may be accorded more additionalretransmissions as they may be more likely to contain time-sensitivedata.

The device may then retransmit the packet in accordance with thedetermined number of additional retransmissions. The device mayre-retransmit the packet in any manner. In some embodiments, the devicemay space the transmission of the additional retransmission(s) so thatthey are unlikely to all be lost in a single network loss event. In somecases, the device may halt the transmission of one or more of theadditional retransmissions upon receiving an indication that the packethas been successfully received.

While the invention has been particularly shown and described withreference to specific preferred embodiments, it should be understood bythose skilled in the art that various changes in form and detail may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims.

1. A method for reducing transmission timeouts by selectivelytransmitting additional packets from an intermediary device based onidentifying transaction boundaries, the method comprising: (a)receiving, by a device via a connection between a sender and a receiver,a first packet from the sender via the connection; (b) transmitting, bythe device, the first packet to the receiver; (c) determining, by thedevice, that the first packet is the last packet of a transaction; (d)generating, by the device in response to the determination, at least oneadditional packet; and (e) transmitting, by the device after the firstpacket has been transmitted to the receiver, the at least one additionalpacket to the receiver via the connection.
 2. The method of claim 1,wherein the connection comprises a transport layer connection.
 3. Themethod of claim 1, wherein the device is one of a client, a server, or anetwork appliance.
 4. The method of claim 1, wherein step (c) comprisesdetermining, by the device, that the first packet is smaller than amaximum packet size of the connection.
 5. The method of claim 1, whereinstep (c) comprises determining, by the device, that the first packet issmaller than a maximum packet size of connection and was immediatelypreceded by at least one packet of the maximum packet size.
 6. Themethod of claim 1, wherein step (c) comprises determining, by thedevice, that the a buffer corresponding to the connection hastransitioned from non-empty to empty.
 7. The method of claim 1, whereinstep (d) comprises generating, by the device in response to thedetermination, at least one additional packet, wherein the at least oneadditional data packet comprises an indication for the receiver totransmit at least one acknowledgement.
 8. The method of claim 1, whereinstep (d) comprises generating, by the device in response to thedetermination, at least one additional packet, wherein the at least oneadditional data packet comprises the first data packet.
 9. The method ofclaim 1, wherein step (d) comprises generating, by the device inresponse to the determination, at least one additional packet, whereinthe at least one additional data packet comprises a portion of thereceived data packet.
 10. The method of claim 1, wherein step (d)comprises generating, by the device in response to the determination, atleast one additional packet, wherein the at least one additional datapacket is generated according to a forward error correction techniquefor previously transmitted data.
 11. The method of claim 1, wherein step(d) comprises generating, by the device in response to thedetermination, at least one additional packet, wherein the number ofadditional data packets transmitted is selected based on a current lossrate for the transport layer connection.
 12. The method of claim 1,further comprising the steps of: (f) receiving, by the device, at leastone acknowledgement corresponding to the at least one additional datapacket; (g) determining, by the device, based on the received at leastone acknowledgement, that one or more previously transmitted datapackets have not been received; and (h) retransmitting, by the device,the one or more previously transmitted data packets that have not beenreceived.
 13. A device for reducing transmission timeouts by selectivelytransmitting additional packets from an intermediary device based onidentifying transaction boundaries, the device comprising: a packetprocessor which receives a first packet from a sender via a connection;and transmits the first packet to a receiver; a flow controller whichdetermines that the first packet is the last packet of a transaction;generates, in response to the determination, at least one additionalpacket; and transmits, after the first packet has been transmitted tothe receiver, the at least one additional packet to the receiver. 14.The system of claim 13, wherein the device serves as an intermediary fora transport layer connection between the sender and the receiver. 15.The system of claim 13, wherein the device is one of a client, a server,or a network appliance.
 16. The system of claim 13, wherein the devicecomprises a transparent proxy.
 17. The system of claim 13, wherein theflow controller determines that a buffer corresponding to the connectionhas transitioned from non-empty to empty.
 18. The system of claim 13,wherein the flow controller determines that the first packet is smallerthan a maximum packet size of the transport layer connection.
 19. Thesystem of claim 13, wherein the flow controller determines that thefirst packet is smaller than a maximum packet size of the transportlayer connection and was immediately preceded by at least one packet ofthe maximum packet size.
 20. The system of claim 13, wherein the flowcontroller generates, in response to the determination, at least oneadditional packet, wherein the at least one additional data packetcomprises an indication for the receiver to transmit at least oneacknowledgement.
 21. The system of claim 13, wherein the flow controllergenerates, in response to the determination, at least one additionalpacket, wherein the at least one additional data packet comprises thefirst data packet.
 22. The system of claim 13, wherein the flowcontroller generates, in response to the determination, at least oneadditional packet, wherein the at least one additional data packetcomprises a portion of the received data packet.
 23. The system of claim13, wherein the flow controller generates, in response to thedetermination, at least one additional packet, wherein the at least oneadditional data packet is generated according to a forward errorcorrection technique for previously transmitted data.
 24. The system ofclaim 13, wherein the flow controller generates, in response to thedetermination, at least one additional packet, wherein the number ofadditional data packets transmitted is selected based on a current lossrate for the transport layer connection.
 25. The system of claim 13,wherein the packet processor receives at least one acknowledgementcorresponding to the at least one additional data packet; determines,based on the received at least one acknowledgement, that one or morepreviously transmitted data packets have not been received; andretransmits the one or more previously transmitted data packets thathave not been received.
 26. A system for reducing transmission timeoutsby selectively transmitting additional packets from an intermediarydevice based on identifying transaction boundaries, the systemcomprising: means for receiving, by a device via a connection between asender and a receiver, a first packet from the sender via theconnection; means for transmitting, by the device, the first packet tothe receiver; means for determining, by the device, that the firstpacket is the last packet of a transaction; means for generating, by thedevice in response to the determination, at least one additional packet;and means for transmitting, by the device after the first packet hasbeen transmitted to the receiver, the at least one additional packet tothe receiver via the connection.